moremoban / moban

General purpose static text generator using Jinja2 and other python template engines
http://moban.readthedocs.io
MIT License
33 stars 14 forks source link

pypi package installation fails without root access #278

Closed jayvdb closed 5 years ago

jayvdb commented 5 years ago
> 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.

moban should probably default to --user if the package isnt already installed globally.

chfw commented 5 years ago

Inside a virtual environment, moban would use caged pip and this problem would go.

jayvdb commented 5 years ago

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

jayvdb commented 5 years ago

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.

chfw commented 5 years ago

This shall go to pypifs