About 55 results
Open links in new tab
  1. python - What exactly should be set in PYTHONPATH? - Stack Overflow

    Here is what I learned: PYTHONPATH is a directory to add to the Python import search path "sys.path", which is made up of current dir. CWD, PYTHONPATH, standard and shared library, and customer …

  2. Adding Python to PATH on Windows - Stack Overflow

    I've been trying to add the Python path to the command line on Windows, yet no matter the method I try, nothing seems to work. I've used the set command, I've tried adding it through the Edit Envir...

  3. python - How to add to the PYTHONPATH in Windows, so it finds my ...

    Sep 13, 2010 · For anyone trying to achieve this with Python 3.3+, the Windows installer now includes an option to add python.exe to the system search path. Read more in the docs.

  4. python - 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 …

  5. 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)?

  6. How can I find where Python is installed on Windows?

    Mar 15, 2009 · I want to find out my Python installation path on Windows. For example: C:\\Python25 How can I find where Python is installed?

  7. How to correctly set PYTHONPATH for Visual Studio Code

    Dec 6, 2018 · I have a situation that I believe is relatively common. I want a script to import a module from another directory. My python project is laid out as follows: ~/project/ | |---modules/ | |---mod.py |- …

  8. pathlib.Path vs. os.path.join in Python - Stack Overflow

    Apr 15, 2021 · 111 pathlib is the more modern way since Python 3.4. The documentation for pathlib says that "For low-level path manipulation on strings, you can also use the os.path module." It …

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

    There are two ways to do it. .pth file 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 …

  10. python - Is `PYTHONPATH` really an environment variable ... - Stack ...

    May 6, 2023 · The docs for sys.path state the following: A list of strings that specifies the search path for modules. Initialized from the environment variable PYTHONPATH, plus an installation-dependent …