[BUG] Error importing meerkat without write access to /tmp
tsy935 opened this issue · comments
Siyi Tang commented
I installed the latest version of meerkat v0.2.1 using pip install meerkat-ml
.
I got the following permission denied error when import meerkat
in python. Because by default it creates a directory under /tmp
but I have no write access to /tmp
.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/siyitang/anaconda3/envs/s3/lib/python3.9/site-packages/meerkat/__init__.py", line 10, in <module>
initialize_logging()
File "/home/siyitang/anaconda3/envs/s3/lib/python3.9/site-packages/meerkat/logging/utils.py", line 26, in initialize_logging
os.makedirs(log_path, exist_ok=True)
File "/home/siyitang/anaconda3/envs/s3/lib/python3.9/os.py", line 215, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/home/siyitang/anaconda3/envs/s3/lib/python3.9/os.py", line 225, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/tmp/2021_10_29/17_06_57'
Temporary workaround is to set export TMPDIR=<some-dir>
.
Sabri Eyuboglu commented
Just merged #179 into the dev branch, which should address this issue. To install from dev
use
pip install "meerkat-ml @ git+https://github.com/robustness-gym/meerkat@dev"
Closing for now – feel free to reopen if the issue persists