python path for setting Django app

403 views Asked by At

Believe me or not but after searching the web for half an hour I couldn't find the answer: How to install django app (ex. django-profile) to the specific python path?

The problem is I installed it with pip but it was installed on the "global" path. I don't want it. I want it to be installed in /home/usr/Dev/lib folder where my project lives.

Could you help me? Am I missing something?

Thank you!

2

There are 2 answers

0
Yuji 'Tomita' Tomita On BEST ANSWER

From the author of pip himself:

Install a Python package into a different directory using pip?

PREFIX_PATH=/path/to/folder
pip install --install-option="--prefix=$PREFIX_PATH" django-profile

This would install django-profile in /path/to/folder/lib/pythonX/site-packages

0
Sergey Golovchenko On

With virtualenv you can customize where the django apps and python packages are installed.