Try to install requirements.txt in Amazon EC2
pip3 install --force-reinstall -r requirements.txt
But get the following error messages
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
Processing /opt/concourse/worker/volumes/live/fdab5f8f-d9cf-4e28-48c7-38c4ee85b3c3/volume/cffi_1606255125152/work
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/opt/concourse/worker/volumes/live/fdab5f8f-d9cf-4e28-48c7-38c4ee85b3c3/volume/cffi_1606255125152/work'
I saw this post error when "sudo pip" on an AWS ec2 instance
here are some PATH variables
echo $PATH
/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/ec2-user/.local/bin:/home/ec2-user/bin
sudo grep secure_path /etc/sudoers
Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin
so I tried
sudo grep secure_path /etc/sudoers
sudo env "PATH=$PATH" pip3 install --force-reinstall -r requirements.txt
But get the following error messages instead
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Invalid requirement: 'cffi @ file:///opt/concourse/worker/volumes/live/fdab5f8f-d9cf-4e28-48c7-
38c4ee85b3c3/volume/cffi_1606255125152/work'
It looks like a path. Does it exist ?
Could anyone help? thank you!