Could not find a version that satisfies the requirement for select requirements

末鹿安然 提交于 2020-04-16 06:54:29

问题


I am currently trying to install a requirements and it is telling me that it is not found when I try and comment them out it happens for others.

I just deployed a Ubuntu 18.04 server. Made the virtual env by the following command python3 -m venv --system-site-packages env but every single time I try and run pip install -r requirements.txt it fails with

Collecting apparmor==2.12 (from -r requirements.txt (line 1))
  Could not find a version that satisfies the requirement apparmor==2.12 (from -r requirements.txt (line 1)) (from versions: )
No matching distribution found for apparmor==2.12 (from -r requirements.txt (line 1))

if I try and install say pip install apparmor it tells me

Collecting apparmor
  Could not find a version that satisfies the requirement apparmor (from versions: )
No matching distribution found for apparmor

But then if I comment out apparmor it tells me this

Collecting apturl==0.5.2 (from -r requirements.txt (line 2))
  Could not find a version that satisfies the requirement apturl==0.5.2 (from -r requirements.txt (line 2)) (from versions: )
No matching distribution found for apturl==0.5.2 (from -r requirements.txt (line 2))

and it goes on for others randomly. The requirements was made on my local which is also ubuntu 18 so unsure why this works on local but not on a new deploy.

I have also made sure that it's the newest version of pip


回答1:


apparmor and apturl are Ubuntu packages, you can safely ignore them if your code doesn't use their code; just remove them from requirements.txt. If your code depends on them, ensure they are installed via apt:

apt install -y apparmor apturl && pip install -r requirements.txt


来源:https://stackoverflow.com/questions/55910971/could-not-find-a-version-that-satisfies-the-requirement-for-select-requirements

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!