I am trying to follow this guide to install python modules however i don’t seem to have virtual environment or pip installed so im trying to get those to continue.
Python 2.7.5 is installed on my cpanel, i want to install extra modules for my scripts. I download:
get-pip.py
using curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
I then try running the python file with:
python get-pip.py
It starts but fails at: Installing collected packages: pip, wheel
.
With error message:
Could not install packages due to an EnvironmentError: [Errno 30] Read-only file system: ‘/usr/lib/python2.7/site-packages/pip’
If i use sudo python get-pip.py
I get the following error message:
jailshell: sudo: command not found
Thanks
2
Answers
I’d the same problem in my ChromeOS and I couldn’t solve it running
chmod -R
in mysite-packages
folder. To solve it I had to installpip
only for my user running:The only problem is that you have to run pip as a python module
python -m pip
, but you can create an alias inside your.bashrc
.Run this issue on my local MacOS with pip2.7, trying to install jwt package
No sudo or trying to chmod the read-only file helped. Solved installation with –user parameter: