pyreason
pyreason copied to clipboard
Permission denied to .cache_status.yaml
I installed PyReason with pip on my system as root and when I try to import the module I am getting the following error:
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.10/site-packages/pyreason/.cache_status.yaml'
I believe this is due to Numba cache path being set to the path based on the package path in: https://github.com/lab-v2/pyreason/blob/29ebb0b25ac6a0dabdd27eb5a3df6ed010c3bd4a/pyreason/init.py#L6
I think that users should be allowed to override NUMBA_CACHE_DIR, so perhaps in __init__.py the environment var could be set to the package path only if not set already.
Hi @mac133k, is there a particular reason why you would need to install pyreason as root?
We can look to incorporate this, but I just wanted to make sure it's necessary to install as root.
On hosts meant to be shared between multiple users it makes sense to install packages under /usr, so they are available to everyone from the standard location rather than having every user maintaining own package collection in their home dirs.