如何将pip安装更改为使用python pip
目前我使用pip安装如何将pip安装更改为使用python pip,python,pip,Python,Pip,目前我使用pip安装subprocess32如下,我想删除对pip的依赖并使用python,如何将pip.main([“install”,“subprocess32]”)更改为C:\Python27\python.exe-m pip install subprocess32 try: import subprocess32 except ImportError: pip.main(["install", "subprocess32"])#change this call to C
subprocess32
如下,我想删除对pip的依赖并使用python,如何将pip.main([“install”,“subprocess32]”)更改为C:\Python27\python.exe-m pip install subprocess32
try:
import subprocess32
except ImportError:
pip.main(["install", "subprocess32"])#change this call to C:\Python27\python.exe -m pip install subprocess32
在Python脚本中安装软件包对我来说似乎不是一个好主意。为什么不把你的需求放在一个文本文件中,比如“requirements.txt”,并在运行脚本之前使用“pip install-r requirements.txt”来安装它们呢?我不想使用pip
,“pip install-r requirements.txt”仍然使用pip。关于如何以编程方式使用executeC:\Python27\python.exe-m pip install SUBSPROCESS32
,您有什么建议吗?pip是python包管理的最佳实践。如果您不想使用pip或添加任何其他依赖项,则必须手动下载并安装。顺便说一句,在Windows中您可以使用或。使用pip并不可怕。@PhilipZou-我仍然使用pip,但作为python pip。.我只想删除用户没有向pip
添加路径的依赖项,请建议如何以编程方式运行C:\Python27\python.exe-m pip安装子流程32
?