How to make editable install of Python package fro

2019-04-06 20:14发布

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?

1条回答
来,给爷笑一个
2楼-- · 2019-04-06 20:58

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

查看更多
登录 后发表回答