how to avoid Permission denied while installing package for Python without sudo how to avoid Permission denied while installing package for Python without sudo python python

how to avoid Permission denied while installing package for Python without sudo


try python setup.py install --user

This will install the package on /home/your_user/.local/lib/pythonX.X/site-packages/ instead of /usr/local/lib/ where you don't have permissions (unless you use sudo).


Maybe you can type this line as normal user:

whereis python

Assume the result is "/usr/bin/python", then:

sudo /usr/bin/python setup.py install