Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 846
nadermx Avatar asked Jan 27 '23 09:01

nadermx


1 Answers

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
like image 166
hoefling Avatar answered Jan 28 '23 21:01

hoefling