Skip to content
Discussion options

You must be logged in to vote

The python import function uses the following looks to find packages and modules to import:

  1. CWD or the current working directory. This is the directory the python interpreter was launched from
  2. the PYTHONPATH environment variable. This is an environment variable you can set before launching the python interpreter to add additional directories to look for packages and modules to import
  3. The sys.path list in the program. This can be modified in the code to add additional places to look for packages and modules
  4. The system, or virtual environments, globally installed packages

If you're unable to import any other scripts other than what's in your project, they likely aren't installed at all, o…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@leedchou
Comment options

@lungdart
Comment options

@leedchou
Comment options

Answer selected by leedchou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants