Вот мой .bash_profile
PYTHONPATH=".:/home/miki725/django/django:$PYTHONPATH"
export PYTHONPATH
Итак, я открываю python, но каталог, добавляемый в .bash_profile
, не первый:
Python 2.4.3 (#1, Sep 21 2011, 20:06:00)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> for i in sys.path:
... print i
...
/usr/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg
/usr/lib/python2.4/site-packages/flup-1.0.2-py2.4.egg
/usr/lib/python2.4/site-packages/MySQL_python-1.2.3c1-py2.4-linux-i686.egg
/usr/lib/python2.4/site-packages/django_form_utils-0.1.7-py2.4.egg
/usr/lib/python2.4/site-packages/mechanize-0.2.1-py2.4.egg
/usr/lib/python2.4/site-packages/Django-1.2.1-py2.4.egg
/usr/lib/python2.4/site-packages/mercurial-1.6-py2.4-linux-i686.egg
/usr/lib/python2.4/site-packages/lxml-2.2.7-py2.4-linux-i686.egg
/usr/lib/python2.4/site-packages/django_registration-0.7-py2.4.egg
/usr/lib/python2.4/site-packages/sorl_thumbnail-3.2.5-py2.4.egg
/usr/lib/python2.4/site-packages/South-0.7.2-py2.4.egg
/usr/lib/python2.4/site-packages/django_keyedcache-1.4_1-py2.4.egg
/usr/lib/python2.4/site-packages/django_livesettings-1.4_3-py2.4.egg
/usr/lib/python2.4/site-packages/django_app_plugins-0.1.1-py2.4.egg
/usr/lib/python2.4/site-packages/django_signals_ahoy-0.1_2-py2.4.egg
/usr/lib/python2.4/site-packages/pycrypto-2.3-py2.4-linux-i686.egg
/usr/lib/python2.4/site-packages/django_threaded_multihost-1.4_0-py2.4.egg
/usr/lib/python2.4/site-packages/PIL-1.1.7-py2.4-linux-i686.egg
/usr/lib/python2.4/site-packages/pyOpenSSL-0.11-py2.4-linux-i686.egg
/usr/lib/python2.4/site-packages/ZSI-2.0_rc3-py2.4.egg
/usr/lib/python2.4/site-packages/PyXML-0.8.4-py2.4-linux-i686.egg
/usr/lib/python2.4/site-packages/pyquery-0.6.1-py2.4.egg
/usr/lib/python2.4/site-packages/pip-1.0.1-py2.4.egg
/usr/lib/python2.4/site-packages/virtualenv-1.6.1-py2.4.egg
/usr/lib/python2.4/site-packages/simplejson-2.1.6-py2.4-linux-i686.egg
/home/miki725
/home/miki725/django/django
/usr/lib/python24.zip
/usr/lib/python2.4
/usr/lib/python2.4/plat-linux2
/usr/lib/python2.4/lib-tk
/usr/lib/python2.4/lib-dynload
/usr/lib/python2.4/site-packages
/usr/lib/python2.4/site-packages/Numeric
/usr/lib/python2.4/site-packages/PIL
/usr/lib/python2.4/site-packages/gtk-2.0
>>>
>>>
>>>
>>>
>>> import django
>>> django.__file__
'/usr/lib/python2.4/site-packages/Django-1.2.1-py2.4.egg/django/__init__.pyc'
>>>
Как ядобавьте путь к питону в .bash_profile
, чтобы это было в начале.Это для общего хостинга.Мне нужно иметь возможность импортировать мою установку django вместо использования системы по умолчанию.
Спасибо