Questions tagged [pythonpath]

PYTHONPATH is an environment variable that can be used to augment the default search path for module imports in Python.

PYTHONPATH is an environment variable that can be used to augment the default search path for module files in Python. Values will be added to sys.path.

758 questions
15
votes
2 answers

How to setup PyCharm for multiple projects

I want to set up PyCharm to work on a set of Python projects in a single window. Lets say I have this projects structure. ~/src ├── py_project1 ├── py_project2 ├── py_project3 ├── other_lang_proj1 └── other_lang_proj2 A system PYTHONPATH of…
jeremyjjbrown
  • 7,772
  • 5
  • 43
  • 55
14
votes
5 answers

Installed module using pip, not found

I am trying to install a package called "simpleguitk" via pip. (On Ubuntu 16.04 with Python 3.5) After running sudo -H pip3 install simpleguitk it says installation is completed successfully. (Except for the pygame dependecy which is actually…
RickSanchez725
  • 336
  • 1
  • 6
  • 14
14
votes
5 answers

PYTHONPATH order on Ubuntu 14.04

I have two computers running Ubuntu 14.04 server (let's call them A and B). B was initially a 10.04 but it has received two upgrades to 12.04 and 14.04. I do not understand why the python path is different on the two computers. As you can see on the…
azmeuk
  • 4,026
  • 3
  • 37
  • 64
12
votes
1 answer

How and why does PyCharm alter Python's import logic?

I have a PyCharm 1.2.1 on Windows. I have to edit different branches of the same project - somewhat heavy branches, because they live in different folders on disk - say it to be c:\apps\alpha and c:\apps\beta. For each such folder PYTHONPATH…
Roman
  • 4,531
  • 10
  • 40
  • 69
12
votes
4 answers

Apache with virtualenv and mod_wsgi : ImportError : No module named 'django'

I'm trying to serve a little django project with the following Apache configuration : Apache virtualhost configuration : ServerName servername [...]
vmonteco
  • 14,136
  • 15
  • 55
  • 86
12
votes
1 answer

What's .pydistutils.cfg for?

I work on two servers, and on one server .pydistutils.cfg looks like: install_scripts=~/opt_old/bin install_data=~/opt_old/share install_lib=~/usr/lib/python2.6/site-packages I think, this creates problems with using pip and linking libraries on…
ilciavo
  • 3,069
  • 7
  • 26
  • 40
12
votes
2 answers

Access a Python Package from local git repository

I have a local git repository on my machine, let's say under /develop/myPackage. I'm currently developing it as a python package (a Django app) and I would like to access it from my local virtualenv. I've tried to include its path in my PYTHONPATH…
Leonardo
  • 4,046
  • 5
  • 44
  • 85
11
votes
6 answers

Apache Superset config.py on

I am trying to customising my Apache Superset. I am not very familiar with Terminal. On the documentation it is written: "To configure your application, you need to create a file (module) superset_config.py and make sure it is in your PYTHONPATH.…
Simone Zanetti
  • 111
  • 1
  • 1
  • 3
11
votes
6 answers

how to set environment variable for root user

I'm Mac user. I want to set PYTHONPATH env for root. so $ sudo su - # vi ~/.profile and add to file 'export PYTHONPATH=/mypythonlib' then # env I can see this line PYTHONPATH=/Users/simpnet2/projects/meiji/src/hershey but.. when I use sudo…
Ickhyun Kwon
  • 1,675
  • 4
  • 13
  • 17
11
votes
2 answers

Python packages with conflicting dependencies

we are trying to install several own written python3 applications sharing some libraries with conflicting versions. We are currently discussing employing the order of packages inside the PYTHONPATH and/ or pythons virtualenv. How would you handle…
Rollmops
  • 362
  • 1
  • 3
  • 11
9
votes
1 answer

Setting the Python path in Visual Studio Code for file 'launch.json'

I have been using Visual Studio Code for a few years and I find it a really good IDE. I program in Python more than any other language. It really bothers me that I did not get around to using the IDE's debugger (even though it's a feature). Error…
Lyle Henkeman
  • 391
  • 1
  • 3
  • 6
9
votes
1 answer

Virtualenv, no-site-packages, sys.path

My essential problem is that I can't get --no-site-packages to "work." I have read a bunch of posts on SO, including this post. I'm a huge Ubuntu noob, and not much better when it comes to how python interacts with the os. Other posts suggested that…
NotAnAmbiTurner
  • 2,553
  • 2
  • 21
  • 44
9
votes
1 answer

WSGIPythonPath is not working

I am deploying my web.py application on Apache2 with mod_wsgi. Here is my virt_host file, WSGIPythonPath /home/ubuntu/plotwatt/libplotwatt:/home/ubuntu/plotwatt/pwstage/src ServerAdmin…
Aashish P
  • 1,894
  • 5
  • 22
  • 36
9
votes
3 answers

How to append multiple Paths to PYTHONPATH programmatically

I have 4 directories: /home/user/test1 /home/user/test2 /home/user/test3 /home/user/test4 I have another directory with tests /home/user/testing having the file testall.py ow, how can I append PATHS, for test1 thru test4 to PYTHONPATH so that I…
kamal
  • 9,637
  • 30
  • 101
  • 168
8
votes
1 answer

Getting setuptools/easy_install to play nicely with PYTHONPATH

Why do setuptools/easy_install .pth files not place nicely with PYTHONPATH, and how do I get them to play nicely, and keep the directories in my PYTHONPATH before those .pth shoves in the sys.path? My current problem is I've created a package for…
AFoglia
  • 7,968
  • 3
  • 35
  • 51