Permission denied issue with cache
Closed this issue · 6 comments
hermit install python3-3.9.11
pip3 install poetry==1.2.0b1
poetry install
Poetry appears to be having a problem with all packages with the cache permissions.
Installing collected packages: setuptools
Attempting uninstall: setuptools
Found existing installation: setuptools 60.9.3
Uninstalling setuptools-60.9.3:
ERROR: Could not install packages due to an OSError: Cannot move the non-empty directory '/Users/damien/Library/Caches/hermit/pkg/python3-3.9.11/install/lib/python3.9/site-packages/_distutils_hack/': Lacking write permission to '/Users/damien/Library/Caches/hermit/pkg/python3-3.9.11/install/lib/python3.9/site-packages/_distutils_hack/'.
I don't know what poetry is but I can't imagine it should be writing to the system Python install.
Poetry is a replacement for pip. It's trying to upgrade setuptools
here, as a system package.
tl;dr this wouldn't be a problem if Hermit setup a virtualenv.
I don't see how this could possibly work on any other system either. eg. the global site-packages would not be user writeable on Linux.
I am not sure why the new version of poetry triggers that error unlike the previous versions. I do like the idea of having virtual environments as part of hermit. However it looks like poetry's virtvualenv system is working with hermit and not having the issue that venv was having with hermit. I think mostly it is also how even though hermit looks more like a user install that we need to think of it as a system install.
I think this is solved now.
Yeah, I forget to close it since we moved to poetry user install and the virtual environments.