python-path

To get PYTHONPATH correct in running Django

I run at a cloned Django repository python manage.py runserver I get Traceback (most recent call last): File "manage.py", line 2, in <module> from django.core.management import execute_manager ImportError: No module named django.core.management The problem is in my PYTHONPATH according to MacPorts' IRC. I run ls -l $(which ...

Managing Python Path When Moving Code from Development Computer to Target

I have a python project with this directory structure and these files: /home/project_root |---__init__.py |---setup |---__init__.py |---configs.py |---test_code |---__init__.py |---tester.py The tester script imports from setup/configs.py with the reference "setup.configs". It runs fine on my development m...

Python .pth Files Aren't Working

Directories listed in my .pth configuration file aren't appearing in sys.path. The contents of configuration file, named some_code_dirs.pth: /home/project Paths to the file: /usr/lib/python2.6/site-packages/some_code_dirs.pth /usr/lib/python2.6/some_code_dirs.pth Check on sys variables in the python interpreter: >>> print sys.pre...

remove item from python path

I have added a path to the system pythonpath on linux and now i've broken it. How may i remove it ? [EDIT] Finally i solved it removing the script that added that path + installing something to rebuild the path. ...

django project directory structure and the python path

I am trying to get the best possible set up for developing my django project from the start and I'm having trouble getting everything to play nicely in the directory structure. I have set up virtualenv's (env in this example) so that I can deploy a clean empty python environment for every django project. The basic structure is as follow...