I have just started Python recently and for some reason, I cannot import anything on my computer. I can do it on the computer at my school, but not my laptop. This is the message I received when I tried to import the program "cTurtle"
>>> import cTurtle
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
ImportError: No module named cTurtle
Alright, importing math worked, so that's a good sign. But I do have the cTurtle program on my computer. I have opened it from the file location and from Python to view the code, but it still will not import for me. Is it possible that it needs to be saved in a specific area to be imported?
# show the system path (aka. PYTHONPATH), a list of directories
# that Python by default would look into
# item at index 0 would be the working directory
print( sys.path )
"""possible output -->
As you can see, you can put the module cTurtle.py into any of these directories, with lib being one of the better choices. Also remember that module names are case sensitive even on a Windows system.