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

pypi package installation fails without root access #5

Open
chfw opened this issue Aug 17, 2019 · 3 comments
Open

pypi package installation fails without root access #5

chfw opened this issue Aug 17, 2019 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@chfw
Copy link
Member

chfw commented Aug 17, 2019

python3 -m moban -m mobanfile
Collecting pypi-mobans-pkg
Downloading https://files.pythonhosted.org/packages/eb/ae/596498079f9036ed90ddd743e6c9e90066826ea6c510ecd71f9ac6e183e7/pypi_mobans_pkg-0.0.5-py2.py3-none-any.whl (128kB)
|████████████████████████████████| 133kB 926kB/s
Requirement already satisfied: lml in /home/python3.7/lib/python3.7/site-packages (from pypi-mobans-pkg) (0.0.9)
Installing collected packages: pypi-mobans-pkg
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/lib/python3.7/site-packages/pypi_mobans_pkg'
Consider using the --user option or check the permissions.

Yes, this obviously is not a bug for scenarios when people are doing everything inside a virtualenv.

So , need to try without --user first, then fallback to with --user , or ...

moban could manage its own packages inside ~/.cache/moban/packages/ and add that to the PYTHONPATH / sys.path

moremoban/moban#278

@chfw chfw added the help wanted Extra attention is needed label Sep 19, 2019
@chfw
Copy link
Member Author

chfw commented May 13, 2020

@chfw
Copy link
Member Author

chfw commented May 13, 2020

My reservation is: what if the package is not found, subprocess call will also fail, which then triggers an additional bound-to-fail call to install on '--user'.

@chfw
Copy link
Member Author

chfw commented May 13, 2020

>>> import os
>>> import subprocess
>>> import sys
>>> subprocess.check_call([sys.executable, "-m", "pip", "install", "pypi-mobans-pkgx"])
ERROR: Could not find a version that satisfies the requirement pypi-mobans-pkgx (from versions: none)
ERROR: No matching distribution found for pypi-mobans-pkgx
WARNING: You are using pip version 20.0.2; however, version 20.1 is available.
You should consider upgrading via the '/Users/jaska/github/moremoban/moban-env/bin/python -m pip install --upgrade pip' command.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/jaska/github/moremoban/moban-env/bin/python', '-m', 'pip', 'install', 'pypi-mobans-pkgx']' returned non-zero exit status 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant