Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make editable install of Python package from vcs into specific directory using pip?

By default pip installs editable packages into src subdirectory of the directory where Python is installed.

I'd like to install a package from version control to a directory of my choosing using pip's support for checking out a package from source control, for example:

pip install -e git+https://github.com/kennethreitz/requests.git@355b97165c#egg=requests-org

Is this possible?

like image 979
Piotr Dobrogost Avatar asked Jun 02 '12 21:06

Piotr Dobrogost


1 Answers

pip help install says:

--src=DIR, --source=DIR, --source-dir=DIR, --source-directory=DIR
                      Check out --editable packages into DIR

For example:

pip install -e git+https://github.com/kennethreitz/requests.git@355b97165c#egg=requests-org --source-directory=/tmp

Will install the requests source in /tmp/requests-org

like image 174
yprez Avatar answered Oct 22 '22 21:10

yprez