Bug 1406133 - `pip install` is broken (path/permissions)
Summary: `pip install` is broken (path/permissions)
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pip
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Tomas Orsava
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-19 19:47 UTC by Christian Stadelmann
Modified: 2017-10-31 15:29 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-10-31 15:29:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github pypa pip issues 1668 0 None None None 2016-12-20 15:35:06 UTC

Description Christian Stadelmann 2016-12-19 19:47:21 UTC
Description of problem:
Pip is unable to install local packages, rendering the package useless.

Version-Release number of selected component (if applicable):
python-pip-8.1.2-2.fc25.noarch
python-2.7.12-7.fc25.x86_64

How reproducible:
always

Steps to Reproduce:
1. run `pip install autoflake` as regular user

Actual results:
$ pip install --disable-pip-version-check autoflake
Collecting autoflake
  Using cached autoflake-0.6.6.tar.gz
Collecting pyflakes>=0.8.1 (from autoflake)
  Using cached pyflakes-1.3.0-py2.py3-none-any.whl
Installing collected packages: pyflakes, autoflake
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 326, in run
    strip_file_prefix=options.strip_file_prefix,
  File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 742, in install
    **kwargs
  File "/usr/lib/python2.7/site-packages/pip/req/req_install.py", line 834, in install
    strip_file_prefix=strip_file_prefix
  File "/usr/lib/python2.7/site-packages/pip/req/req_install.py", line 1037, in move_wheel_files
    strip_file_prefix=strip_file_prefix,
  File "/usr/lib/python2.7/site-packages/pip/wheel.py", line 346, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/lib/python2.7/site-packages/pip/wheel.py", line 317, in clobber
    ensure_dir(destdir)
  File "/usr/lib/python2.7/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
    os.makedirs(path)
  File "/usr/lib64/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/pyflakes-1.3.0.dist-info'

Expected results:
install autoflake as regular user

Comment 1 Petr Viktorin (pviktori) 2016-12-20 09:44:10 UTC
To install as a regular user, run `pip install --user autoflake`.

Without --user, pip is useful to install into virtual environments.

Comment 2 Christian Stadelmann 2016-12-20 15:13:44 UTC
Oh, I forgot that, thanks!

Is there any chance we can get pip to give the user the hint you just gave me?

Comment 3 Petr Viktorin (pviktori) 2016-12-20 15:34:23 UTC
There is an issue for that upstream: https://github.com/pypa/pip/issues/1668

Comment 4 Petr Viktorin (pviktori) 2017-10-31 15:29:20 UTC
We won't be working on this from the Fedora side. As you can see in the upstream issue, this is quite complicated, and any quick fix we do here is likely to conflict with upstream later.

The issue is tracked upstream, and it'll get into Fedora when it's released there. So, I'll close this report as UPSTREAM.


Note You need to log in before you can comment on or make changes to this bug.