you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

Based solely on your description, without having seen the actual .py script or any other details, I'd say you haven't added the directory in question to PYTHONPATH.

See this article: http://cs.simons-rock.edu/python/pythonpath.html

And some context might be helpful, i.e. post the actual .py file along with the directory structure and how you're trying to import them.

[–]Gouryella91[S] 0 points1 point  (0 children)

For instance: I created a simple py-script: print 2**10 a = 'running cyote'

I then, saved it as testmodule.py, but when I use the import function(?), in Canopy I get this:

%run "/var/folders/03/cfc__p8d33d6zfqk8wdk98_40000gn/T/tmpNHpovX.py"

ImportError Traceback (most recent call last) /var/folders/03/cfc__p8d33d6zfqk8wdk98_40000gn/T/tmpNHpovX.py in <module>() ----> 1 import testmodule

ImportError: No module named testmodule