从安装程序包要求.txt在github rep中

2024-06-16 13:20:32 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试从使用pipreqs生成的需求文件中pip安装软件包。你知道吗

但是,我不断遇到以下错误消息:

fatal: repository 'https://raw.githubusercontent.com/EmmS21/SpringboardCapstoneBoxingPredictionWebApp/master/code/requirements.txt/' not found
ERROR: Command errored out with exit status 128: git clone -q https://raw.githubusercontent.com/EmmS21/SpringboardCapstoneBoxingPredictionWebApp/master/code/requirements.txt 'C:\Users\User\Documents\src\pandas' Check the logs for full command output.

这是我写的代码:

pip install -e git+https://raw.githubusercontent.com/EmmS21/SpringboardCapstoneBoxingPredictionWebApp/master/code/requirements.txt#egg=pandas

Tags: pip文件httpsgitmastertxtcompandas
3条回答

-r安装需求。git+仅当您试图从git repo安装包时才需要,但是您有到该文件的直接链接,所以请删除该链接。你知道吗

pip install -r https://raw.githubusercontent.com/EmmS21/SpringboardCapstoneBoxingPredictionWebApp/master/code/requirements.txt

如果使用的是pip install -e,则不能直接指定requirements.txt文件。pip正在尝试克隆存储库的副本,并且/master/code等使其成为无效的git存储库URL。你知道吗

我猜是中的/导致了问题https://raw.githubusercontent.com/EmmS21/SpringboardCapstoneBoxingPredictionWebApp/master/code/requirements.txt

您可以通过:pip install -r https://raw.githubusercontent.com/EmmS21/SpringboardCapstoneBoxingPredictionWebApp/master/code/requirements.txt安装它

相关问题 更多 >