Python uses the directories listed in PYTHONPATH to find a module. How can I assure that the module I am importing is on this list of paths?
Jump to Post
This will show the PYTHONPATH:
# show the system path for Python = PYTHONPATH import sys print sys.path # notice that your present working folder is print sys.path
To add another path, the one with your module perhaps, do this at the beginning of your program:
All 3 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.