Top "Sys.path" questions

An automatically initialized list in Python that contains the search path for modules.

Permanently adding a file path to sys.path in Python

I had a file called example_file.py, which I wanted to use from various other files, so I decided …

python sys.path
Get parent of current directory from Python script

I want to get the parent of current directory from Python script. For example I launch the script from /home/…

python sys sys.path
PYTHONPATH vs. sys.path

Another developer and I disagree about whether PYTHONPATH or sys.path should be used to allow Python to find a …

python python-import pythonpath sys.path
Add a directory to Python sys.path so that it's included each time I use Python

Currently, when trying to reference some library code, I'm doing this at the top of my python file: import sys …

python windows sys.path
Python: select one of multiple installed module versions

On my system, I have several modules installed multiple times. To give an example, numpy 1.6.1 is installed in the standard …

python module pythonpath versions sys.path
How is the python module search path determined on Mac OS X?

When a non built-in module is imported, the interpreter searches in the locations given by sys.path. sys.path is …

python macos pythonpath sys.path
How to refresh sys.path?

I've installed some packages during the execution of my script as a user. Those packages were the first user packages, …

python python-2.7 packages reload sys.path
Setting a default sys.path for a Notebook

I have all my .py files inside a folder script and all my IPython-notebooks under a folder named Notebook. There …

python jupyter-notebook sys.path
importing beautiful soup in python3

I am trying to import beautifulsoup in python3. I have this line: from bs4 import BeautifulSoup It says: from bs4 …

python python-3.x python-3.4 sys.path
Python can't find modules with PYTHONPATH set

I’m totally confused with new python 2.7.10. I've installed python 2.7.10 from tar.xz, which was downloaded from official site. Then …

python import path pythonpath sys.path