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 install --use-wheel doesn't respect --user for installing scripts #1163

Closed
habnabit opened this Issue Aug 23, 2013 · 5 comments

Comments

Projects
None yet
3 participants
@habnabit

habnabit commented Aug 23, 2013

For example:

habnabit@bach:~$ pip install --use-wheel -i [redacted] -r requirements.txt --user
Downloading/unpacking zope.interface==4.0.5 (from -r requirements.txt (line 2))
  Downloading zope.interface-4.0.5-cp27-none-linux_x86_64.whl (144kB): 144kB downloaded
Downloading/unpacking Twisted==12.3.0 (from -r requirements.txt (line 3))
  Downloading Twisted-12.3.0-cp27-none-linux_x86_64.whl (2.9MB): 2.9MB downloaded
Downloading/unpacking py-bcrypt==0.3 (from -r requirements.txt (line 4))
  Downloading py_bcrypt-0.3-cp27-none-linux_x86_64.whl
Downloading/unpacking web.py==0.37 (from -r requirements.txt (line 5))
  Downloading web.py-0.37-py27-none-any.whl (100kB): 100kB downloaded
Downloading/unpacking SQLAlchemy==0.7.10 (from -r requirements.txt (line 6))
  Downloading SQLAlchemy-0.7.10-cp27-none-linux_x86_64.whl (727kB): 727kB downloaded
Downloading/unpacking psycopg2==2.5 (from -r requirements.txt (line 7))
  Downloading psycopg2-2.5-cp27-none-linux_x86_64.whl (309kB): 309kB downloaded
Downloading/unpacking sanpera==0.1.1.dev1 (from -r requirements.txt (line 8))
  Downloading sanpera-0.1.1.dev1.tar.gz (239kB): 239kB downloaded
  Running setup.py egg_info for package sanpera
    Package ImageMagick was not found in the pkg-config search path.
    Perhaps you should add the directory containing `ImageMagick.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'ImageMagick' found
    Package ImageMagick was not found in the pkg-config search path.
    Perhaps you should add the directory containing `ImageMagick.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'ImageMagick' found

Downloading/unpacking anyjson==0.3.3 (from -r requirements.txt (line 9))
  Downloading anyjson-0.3.3-py27-none-any.whl
Downloading/unpacking yajl==0.3.5 (from -r requirements.txt (line 10))
  Downloading yajl-0.3.5-cp27-none-linux_x86_64.whl (56kB): 56kB downloaded
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./.local/lib/python2.7/site-packages/setuptools-1.0-py2.7.egg (from zope.interface==4.0.5->-r requirements.txt (line 2))
Installing collected packages: zope.interface, Twisted, py-bcrypt, web.py, SQLAlchemy, psycopg2, sanpera, anyjson, yajl
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/home/habnabit/.local/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/basecommand.py", line 134, in main
    status = self.run(options, args)
  File "/home/habnabit/.local/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/commands/install.py", line 241, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/home/habnabit/.local/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/req.py", line 1298, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/home/habnabit/.local/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/req.py", line 595, in install
    self.move_wheel_files(self.source_dir)
  File "/home/habnabit/.local/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/req.py", line 815, in move_wheel_files
    move_wheel_files(self.name, self.req, wheeldir, user=self.use_user_site, home=self.target_dir)
  File "/home/habnabit/.local/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/wheel.py", line 184, in move_wheel_files
    clobber(source, dest, False, fixer=fixer)
  File "/home/habnabit/.local/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/wheel.py", line 166, in clobber
    shutil.move(srcfile, destfile)
  File "/usr/lib/python2.7/shutil.py", line 301, in move
    copy2(src, real_dst)
  File "/usr/lib/python2.7/shutil.py", line 130, in copy2
    copyfile(src, dst)
  File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/usr/bin/trial'

Why is this trying to write to /usr/bin when --user is given?

@dholth

This comment has been minimized.

Show comment
Hide comment
@dholth

dholth Aug 23, 2013

Member

It's probably either a bug in https://github.com/pypa/pip/blob/develop/pip/locations.py#L131 or the user flag isn't making it through to that point.

Member

dholth commented Aug 23, 2013

It's probably either a bug in https://github.com/pypa/pip/blob/develop/pip/locations.py#L131 or the user flag isn't making it through to that point.

@qwcode

This comment has been minimized.

Show comment
Hide comment
@qwcode

qwcode Aug 24, 2013

Contributor

this line is throwing away the proper location for scripts.
https://github.com/pypa/pip/blob/develop/pip/locations.py#L147

the bin_py logic location up above can probably replaced with the newer distutils_scheme method.

Contributor

qwcode commented Aug 24, 2013

this line is throwing away the proper location for scripts.
https://github.com/pypa/pip/blob/develop/pip/locations.py#L147

the bin_py logic location up above can probably replaced with the newer distutils_scheme method.

@qwcode

This comment has been minimized.

Show comment
Hide comment
@qwcode

qwcode Aug 24, 2013

Contributor

btw, there is a --user test for wheels, just wasn't confirming scripts.

Contributor

qwcode commented Aug 24, 2013

btw, there is a --user test for wheels, just wasn't confirming scripts.

@qwcode

This comment has been minimized.

Show comment
Hide comment
@qwcode

qwcode Aug 30, 2013

Contributor

fyi, will get on this tomorrow.

Contributor

qwcode commented Aug 30, 2013

fyi, will get on this tomorrow.

@qwcode

This comment has been minimized.

Show comment
Hide comment
@qwcode

qwcode Sep 3, 2013

Contributor

merged #1176. closing.

Contributor

qwcode commented Sep 3, 2013

merged #1176. closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment