Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip fails to install some Python packages... #4729

Closed
jiapei100 opened this issue Sep 18, 2017 · 3 comments
Closed

pip fails to install some Python packages... #4729

jiapei100 opened this issue Sep 18, 2017 · 3 comments
Labels
auto-locked Outdated issues that have been locked by automation type: support User Support

Comments

@jiapei100
Copy link

  • Pip version: 9.0.1
  • Python version: 3.5.2
  • Operating system: Ubuntu 16.04

Description:

// REPLACE ME: What are you trying to get done, what has happened, what went wrong, and what did you expect?
NO ERROR

What I've run:

Collecting matplotlib
  Using cached matplotlib-2.0.2-cp35-cp35m-manylinux1_x86_64.whl
Requirement already satisfied: numpy>=1.7.1 in /home/jiapei/.local/lib/python3.5/site-packages (from matplotlib)
Requirement already satisfied: pyparsing!=2.0.0,!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 in /usr/lib/python3/dist-packages (from matplotlib)
Requirement already satisfied: pytz in /usr/lib/python3/dist-packages (from matplotlib)
Requirement already satisfied: six>=1.10 in /home/jiapei/.local/lib/python3.5/site-packages (from matplotlib)
Collecting cycler>=0.10 (from matplotlib)
  Using cached cycler-0.10.0-py2.py3-none-any.whl
Requirement already satisfied: python-dateutil in /usr/lib/python3/dist-packages (from matplotlib)
Installing collected packages: cycler, matplotlib
  Found existing installation: cycler 0.9.0
    Uninstalling cycler-0.9.0:
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.5/shutil.py", line 538, in move
    os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3/dist-packages/__pycache__/cycler.cpython-35.pyc' -> '/tmp/pip-6xxm78w3-uninstall/usr/lib/python3/dist-packages/__pycache__/cycler.cpython-35.pyc'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jiapei/.local/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/jiapei/.local/lib/python3.5/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/home/jiapei/.local/lib/python3.5/site-packages/pip/req/req_set.py", line 778, in install
    requirement.uninstall(auto_confirm=True)
  File "/home/jiapei/.local/lib/python3.5/site-packages/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/home/jiapei/.local/lib/python3.5/site-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/home/jiapei/.local/lib/python3.5/site-packages/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/usr/lib/python3.5/shutil.py", line 553, in move
    os.unlink(src)
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3/dist-packages/__pycache__/cycler.cpython-35.pyc'```
@pfmoore
Copy link
Member

pfmoore commented Sep 18, 2017

From the line

PermissionError: [Errno 13] Permission denied: '/usr/lib/python3/dist-packages/__pycache__/cycler.cpython-35.pyc' -> '/tmp/pip-6xxm78w3-uninstall/usr/lib/python3/dist-packages/__pycache__/cycler.cpython-35.pyc'

it looks like you're trying to manage a system-installed package using a user-level pip command. You should be using your system package manager (apt) to manage the system installed packages, or if you are trying to use packages not provided by your system, you should use a user-level installation, either via pip install --user or by using virtual environments to create an independent Python environment that you can use without affecting your system installed environment.

@pradyunsg pradyunsg added S: awaiting response Waiting for a response/more information type: support User Support labels Oct 1, 2017
@pradyunsg
Copy link
Member

Closing due to a lack of a response.

@pradyunsg pradyunsg removed the S: awaiting response Waiting for a response/more information label Dec 23, 2017
@lock
Copy link

lock bot commented Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation type: support User Support
Projects
None yet
Development

No branches or pull requests

3 participants