pyreason icon indicating copy to clipboard operation
pyreason copied to clipboard

Permission denied to .cache_status.yaml

Open mac133k opened this issue 1 year ago • 2 comments

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.

mac133k avatar Jan 01 '24 22:01 mac133k

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.

dyumanaditya avatar Jan 02 '24 12:01 dyumanaditya

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.

mac133k avatar Jan 02 '24 19:01 mac133k