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

Add --user switch #6

Closed
mihaic opened this issue Jan 7, 2016 · 10 comments
Closed

Add --user switch #6

mihaic opened this issue Jan 7, 2016 · 10 comments

Comments

@mihaic
Copy link

mihaic commented Jan 7, 2016

It would be great to have a "--user" switch, just like the one pip itself has.

See also pip-tools issue jazzband#45.

@jgonggrijp
Copy link
Owner

Thanks for pointing this out. I'm planning on a major rewrite where flags like --user and --outdated are simply forwarded to pip list. So if you can wait for that (it might take a while), you are all set. Otherwise, I might also accept pull requests in the meanwhile.

@jgonggrijp
Copy link
Owner

Closed in version 1.0.

@HaleTom
Copy link

HaleTom commented Oct 4, 2017

For other googlers wondering, pip-review --auto --user works.

@x-ji
Copy link

x-ji commented Jun 4, 2018

For some reason using this flag (pip-review --auto --user) still doesn't work:

  Found existing installation: absl-py 0.1.10
    Uninstalling absl-py-0.1.10:
      Successfully uninstalled absl-py-0.1.10
  Rolling back uninstall of absl-py
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/lib/python3.6/site-packages/absl_py-0.2.2.dist-info'
Consider using the `--user` option or check the permissions.

Running manually pip install --user --upgrade absl-py works somehow.

Collecting absl-py
Requirement not upgraded as not directly required: six in /usr/lib/python3.6/site-packages (from absl-py) (1.11.0)
Installing collected packages: absl-py
  Found existing installation: absl-py 0.1.10
    Uninstalling absl-py-0.1.10:
      Successfully uninstalled absl-py-0.1.10
Successfully installed absl-py-0.2.2
  • System: Host: jx-X1 Kernel: 4.14.47-1-MANJARO x86_64 bits: 64 compiler: gcc v: 8.1.0 Desktop: i3 4.15.0.1 Distro: Manjaro Linux 17.1.10 Hakoila
  • Python: 3.6.5
  • pip: 10.0.1 from /usr/lib/python3.6/site-packages/pip (python 3.6)

@jgonggrijp
Copy link
Owner

@x-ji Thanks for reporting. I'm going to look into this some time after June 15.

@jgonggrijp jgonggrijp reopened this Jun 4, 2018
@jgonggrijp
Copy link
Owner

@x-ji I think this is a side effect of you having absl-py installed both in your global site packages and in your user site packages. The --user flag gets passed to pip list but not to pip install. So pip-review finds that absl-py is outdated in the user site and then tries to update it in the global site.

We could fix this by passing the --user option both to pip list and pip install, but this is more complicated than it may seem. If you want to discuss this further, please take it to #62.

@cjbassi
Copy link

cjbassi commented Sep 28, 2018

Just fyi, pip-review --user --auto gave me a permissions error by trying to install an out of date user package at the root site-packages even though the package was not installed at the root level. So it's just taking all out of date user packages and trying to install/upgrade them at the root level.

@dimitry-ishenko
Copy link

Just to confirm, this is still an issue. Here's the output:

waldo@razer:~$ pip-review --user --auto
Collecting virtualenv==16.6.1
  Using cached https://files.pythonhosted.org/packages/c4/9a/a3f62ac5122a65dec34ad4b5ed8d802633dae4bc06a0fc62e55fe3e96fe1/virtualenv-16.6.1-py2.py3-none-any.whl
Installing collected packages: virtualenv
  Found existing installation: virtualenv 16.6.0
    Uninstalling virtualenv-16.6.0:
      Successfully uninstalled virtualenv-16.6.0
  Rolling back uninstall of virtualenv
  Moving to /home/waldo/.local/bin/virtualenv
   from /tmp/pip-uninstall-m0cc97br/virtualenv
  Moving to /home/waldo/.local/lib/python3.7/site-packages/__pycache__/virtualenv.cpython-37.pyc
   from /tmp/pip-uninstall-4abr9370/virtualenv.cpython-37.pyc
  Moving to /home/waldo/.local/lib/python3.7/site-packages/virtualenv-16.6.0.dist-info/
   from /home/waldo/.local/lib/python3.7/site-packages/~irtualenv-16.6.0.dist-info
  Moving to /home/waldo/.local/lib/python3.7/site-packages/virtualenv.py
   from /tmp/pip-uninstall-e3j757my/virtualenv.py
  Moving to /home/waldo/.local/lib/python3.7/site-packages/virtualenv_support/
   from /home/waldo/.local/lib/python3.7/site-packages/~irtualenv_support
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python3.7'
Consider using the '--user' option or check the permissions.

virtualenv has been installed using pip install --user virtualenv.
virtualenv is not installed in /usr/lib/python* or /usr/local/lib/python* or anywhere else in the system.
Running pip install --user --upgrade virtualenv I was able to update virtualenv.

@jgonggrijp
Copy link
Owner

@dimitry-ishenko Yes, "this" is still an issue, but by "this" you mean #62. That issue has a poll; please read #62 (comment) and leave an opinion if you have one.

@Konfekt
Copy link

Konfekt commented Jun 26, 2019

A brute solution to avoid updating all dependencies would be adding --no-deps to pip install. But maybe there is a flag to only avoid updating those dependencies for which there are no permissions.

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

No branches or pull requests

7 participants