2

I recently had to switch my machine at work. On the new machine, pip is not anymore.

$ pip --version
...
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/virtualenv-15.0.1.dist-info'

I imagine that this issue is caused by virtualenv, as I never encountered any problems on my old machine and the only difference I find, is that there was no virtualenv package installed on the old machine.

However

$ python -c "import pip; print pip.__version__"
10.0.1 

still works.

I would be grateful if anyone could provide help, how to fix this problem or trace down the real problem.

Please note: I do not have root rights.

daveoncode
19.8k19 gold badges108 silver badges163 bronze badges
asked Apr 27, 2018 at 11:49
4
  • Merely installing the virtualenv package wouldn't break pip. Do you mean pip works when you have no virtual environments active but breaks in the virtual environment you are using? Commented Apr 27, 2018 at 11:58
  • Is virtualenv installed, and can you run virtualenv? Commented Apr 27, 2018 at 11:59
  • Ask a sysadmin to check permissions for all directories in the path /usr/local/lib/python2.7/dist-packages/virtualenv-15.0.1.dist-info. Commented Apr 27, 2018 at 14:06
  • Sorry for the late response, something came in between. I will be able to check things on Monday. @DaniloRiecken it is installed, I looked up the documentation how to disable active environments, none was running. What exactly should I check? I never worked with 'virtualenv' so I got no idea how it works. We currently have no active sysadmin, but I will try figure things out, I will give you the info on content of the directory on Monday. Thanks a lot for the help. Commented Apr 27, 2018 at 19:15

1 Answer 1

1

Here the problem is you don't have permission to the system folder. So whenever you use pip try to use it like this.

python -m pip install --user package

Here the package means the package you need to install using pip. Furthermore try using the following command to upgrade the version of your pip.

python -m pip install --user --upgrade pip
answered May 19, 2018 at 1:17
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.