About 2,120,000 results
Open links in new tab
  1. What exactly should be set in PYTHONPATH? - Stack Overflow

    It is always appended to PYTHONPATH. An additional directory will be inserted in the search path in front of PYTHONPATH as described above under Interface options. The search path can be …

  2. How do I find out my PYTHONPATH using Python? - Stack Overflow

    Sep 28, 2009 · How do I find out which directories are listed in my system’s PYTHONPATH variable, from within a Python script (or the interactive shell)?

  3. Is `PYTHONPATH` really an environment variable? - Stack Overflow

    May 6, 2023 · The variable PYTHONPATH is an environment variable which you can set to add additional directories where python will look for modules and packages. This variable is not set by …

  4. In Python script, how do I set PYTHONPATH? - Stack Overflow

    Jun 24, 2010 · I know how to set it in my /etc/profile and in my environment variables. But what if I want to set it during a script? Is it import os, sys? How do I do it?

  5. How to add to the PYTHONPATH in Windows, so it finds my modules ...

    Sep 13, 2010 · The PYTHONPATH environment variable is used by Python to specify a list of directories that modules can be imported from on Windows. When running, you can inspect the sys.path …

  6. How do you correctly set the PYTHONPATH variable on Windows?

    Feb 29, 2012 · PYTHONPATH = If this variable exists in your environment, Python will add it to the normal search path for modules when you use any import statement; you normally do not modify this …

  7. How to correctly set PYTHONPATH for Visual Studio Code

    Dec 6, 2018 · I cannot set PYTHONPATH for pylint as that runs in some environment different than the integrated terminal and whatever is controlled by launch.json, so I can only tell pylint to ignore import …

  8. How to globally modify the default PYTHONPATH (sys.path)?

    PYTHONPATH Any .pth file which is found on the default path (see bellow) will get its content included into sys.path. Format of said .pth file is simple: one (folder) path per line.

  9. PATH issue with pytest 'ImportError: No module named ...'

    No need to write custom code for mangling the sys.path or remember to drag PYTHONPATH along, or placing __init__.py into dirs where it doesn't belong (using python -m pytest as suggested in Apteryx …

  10. Permanently add a directory to PYTHONPATH? - Stack Overflow

    Aug 4, 2010 · Whenever I use sys.path.append, the new directory will be added. However, once I close python, the list will revert to the previous (default?) values. How do I permanently add a directory to …