本文介绍了我可以使用`pip`代替`easy_install`进行`python setup.py install`依赖解析吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

python setup.py install 将使用 easy_install 自动安装 requires=[] 中列出的软件包.我如何让它使用 pip 代替?

python setup.py install will automatically install packages listed in requires=[] using easy_install. How do I get it to use pip instead?

推荐答案

是的,你可以.您可以从网络或计算机上的 tarball 或文件夹安装包.例如:

Yes you can. You can install a package from a tarball or a folder, on the web or your computer. For example:

pip install https://pypi.python.org/packages/source/r/requests/requests-2.3.0.tar.gz

从本地 tarball 安装

wget https://pypi.python.org/packages/source/r/requests/requests-2.3.0.tar.gz
pip install requests-2.3.0.tar.gz

从本地文件夹安装

tar -zxvf requests-2.3.0.tar.gz
cd requests-2.3.0
pip install .

您可以删除requests-2.3.0文件夹.

pip install -e .

这会以可编辑模式安装包

This installs the package in editable mode. Any changes you make to the code will immediately apply across the system. This is useful if you are the package developer and want to test changes. It also means you can't delete the folder without breaking the install.

这篇关于我可以使用`pip`代替`easy_install`进行`python setup.py install`依赖解析吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!