[Newbies] Could not install packages due to an EnvironmentError:
Tofloor
poster avatar
阿军呀
deepin
2023-06-04 09:27
Author

新手转Linux,不懂,用apt就开始安装依赖包,然后报错:

torch>=1.10
bmtrain>=0.2.1
jieba
tqdm
tensorboard
numpy>=1.21.0
spacy
opendelta
验证成功
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
E: 无法定位软件包 requirements.txt
E: 无法按照 glob ‘requirements.txt’ 找到任何软件包
E: 无法按照正则表达式 requirements.txt 找到任何软件包

论坛大佬指点,然后安装sudo apt-get install python3-pip -y

但是报错:


Could not install packages due to an EnvironmentError: 404 Client Error:
在国内论坛找了一圈儿,没有答案,在这个外网论坛找到答案:
https://stackoverflow.com/questions/59640898/could-not-install-packages-due-to-an-environmenterror-404-client-error/59641095
把命令:
pip3 install requirements.txt
换成:
pip3 install -r requirements.txt
Reply Favorite View the author
All Replies
SamLukeYes
deepin
2023-06-04 10:25
#1

requirements.txt 是给 pip 看的,不是给 apt 看的tail

Reply View the author
阿军呀
deepin
2023-06-04 11:39
#2

哦,刚刚从windows 转过来,不懂。这个pip刚刚弄半小时 ,原来是要pip3。不过,又报错了:

Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/requirements-txt/

Linux上真是太难搞了,是不是deepin里面安装了两个版本的python有冲突。

Reply View the author
阿军呀
deepin
2023-06-04 12:07
#3
It has been deleted!
阿军呀
deepin
2023-06-04 12:08
#4
SamLukeYes

requirements.txt 是给 pip 看的,不是给 apt 看的tail

感谢大佬,问题解决了,Linux上要安装pip3

然后把命令:

 pip3 install requirements.txt

换成:

 pip3 install -r requirements.txt

这样不会报以下错误了:

Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/requirements-txt/
Reply View the author