使用python pip install git + git设置本地Python环境

问题描述 投票:0回答:1

我知道可以使用以下命令从git和pip安装软件包。

pip安装git + git://github.com/author/package.git@master

所以,基本上这个新命令应该做的是,

它应该仅使用名称就可以在我的本地安装所有必需的软件包,或者更确切地说,无需我将完整的软件包仅上传到git的名称。

所以基本上,我正在尝试使用git复制此命令。

pip install -r requirements.txt

这甚至可能吗?有人做过吗?

示例:Requirements.txt包含:

pandas==1.0.4 
matplotlib==3.2.1 
numpy=1.18.5

因此,如果有可能,在setup.py的git目录中安装该软件包。

import pip 

    with open('requirements.txt','r') as fh:   
      for line in fh.readlines():
        pip install line
python python-3.x git python-2.7 pip
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.