Reputation: 5074
Say I a have python module with a proper setup.py which I would like to install to my own user.
However a simple installation will fail as such, since it attempts to install globally on my system
% python setup.py install
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying src/somemodule.py -> build/lib.linux-x86_64-2.7
running install_lib
copying build/lib.linux-x86_64-2.7/somemodule.py -> /usr/local/lib/python2.7/dist-packages
error: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/somemodule.py'
I have root access to the machine. This is not the point.
Is there a way to install with setuptools (say, as a user-specific site-packages). I am not looking for virtualenv nor python setup.py build
, but something in line with what I would be able to with pip as in
% pip install --user somemodule.py
Upvotes: 4
Views: 4475