I’m running OSX Yosemite 10.10.5 with Python 3.6.0, normally I only write short 10-20 line scripts to reformat JSON etc as a replacement for grep/awk/sed and just use vi or idle to write the code, but I’ve tried to pick up Atom since I need to write some more serious stuff. But there are some oddities with code that runs when I type “python3 script.py”, but not when I press ctrl-r in Atom.
I think I have configured “runner” correctly in Atom:
Here’s one particular and rather trivial example, written in/saved by Atom::
ssl._create_default_https_context = ssl._create_unverified_context
x = urllib.request.urlopen(‘https://s3-us-west-2.amazonaws.com/immaginare-public/helloworld.html’)
When I try this on the command line it works fine:
$ python3 urltest.py
b’\n\n Server is up\n\n\nServer is up\n\n\n’
However when I press “ctrl-r” in Atom I get:
Traceback (most recent call last):
File “/Users/user/Desktop/PYTHON/urltest/urltest.py”, line 2, in
ImportError: No module named request
I’ve tried configuring “runner” with “/Library/Frameworks/Python.framework/Versions/3.6/bin/python3” but no luck…
Have I misconfigured my Atom wrong?
Thanks in advance!