Search code examples
pythonubuntupippermission-deniedsetup.py

python setup.py install without sudo


I have a project with some structure, it is console script. The project has setup.py file.

All I want is to install my package any way without using sudo. I spent like 10 hours browsing the internet and can't find a working solution.

I keep getting error: [Errno 13] Permission denied: 'srm.egg-info/PKG-INFO' if using virtualenv

And getting [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/test-easy-install-27105.write-test'

It works good enough with sudo(but there are troubles with uninstall, and it is still not working with virtualenv)

Using: Ubuntu 14.04, Python 2.7,


Solution

  • Use the parameter --user to specify your home directory:

    python setup.py install --user