jhwangbo / ME491_2022_project

MIT License
0 stars 2 forks source link

Error with compile raisimgym #6

Closed SanghaJeon closed 2 years ago

SanghaJeon commented 2 years ago

I entered the command to compile raisimgym in path: ~/raisim_ws/raisimlib and ~/raisim_ws/raisimlib/raisimGymTorch $python3 setup develop

but there were both same error messages like this : python3: can't open file 'setup': [Errno 2] No such file or directory

What should I missed? Is there any error with path? I already checked with example code './anymals'. Thank you.

jhwangbo commented 2 years ago

did you try python ./setup.py develop?

SanghaJeon commented 2 years ago

I tried python ./setup.py develop in path ~/raisim_ws/raisimlib/raisimGymTorch, and the result is :

running develop error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the installation directory:

[Errno 13] Permission denied: '/usr/local/lib/python3.8/dist-packages/test-easy-install-8025.write-test'

The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was:

/usr/local/lib/python3.8/dist-packages/

Perhaps your account does not have write access to this directory? If the installation directory is a system-owned directory, you may need to sign in as the administrator or "root" account. If you do not have administrative access to this machine, you may wish to choose a different installation directory, preferably one that is listed in your PYTHONPATH environment variable.

For information on other options, you may wish to consult the documentation at:

https://setuptools.readthedocs.io/en/latest/easy_install.html

Please make the appropriate changes for your system and try again.

Should I change something with python directory or path? Thank you.

SeungHunJeon commented 2 years ago

Please use sudo at the head <-> sudo python3 setup.py develop

if you use python3 directly, the command import the python library from the usr/lib

Permission is necessary while creating packages in usr/lib directory.

Instead, I recommend you to use virtual environment or conda environment as substitute environment rather than original one.

python venv

conda env

SanghaJeon commented 2 years ago

With sudo python3 ./setup.py develop, it works. Thank you for your help.

But when I tried with

cd ~/raisim_ws/raisimlib/raisimGymTorch/raisimGymTorch/env/envs/rsg_anymal sudo python3 ./runner.py

There is an error message.

Traceback (most recent call last): File "./runner.py", line 3, in from raisimGymTorch.helper.raisim_gym_helper import ConfigurationSaver, load_param, tensorboard_launcher File "/home/sangha/raisim_ws/raisimlib/raisimGymTorch/raisimGymTorch/helper/init.py", line 1, in from .raisim_gym_helper import File "/home/sangha/raisim_ws/raisimlib/raisimGymTorch/raisimGymTorch/helper/raisim_gym_helper.py", line 5, in import torch File "/usr/local/lib/python3.8/dist-packages/torch-1.13.0-py3.8-linux-x86_64.egg/torch/init.py", line 191, in _load_global_deps() File "/usr/local/lib/python3.8/dist-packages/torch-1.13.0-py3.8-linux-x86_64.egg/torch/init.py", line 153, in _load_global_deps ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL) File "/usr/lib/python3.8/ctypes/init.py", line 373, in init self._handle = _dlopen(self._name, mode) OSError: libcublas.so.11: cannot open shared object file: No such file or directory sangha@sangha-lenovo-y520:~/raisim_ws/raisimlib/raisimGymTorch/raisimGymTorch/env/envs/rsg_anymal$ sudo python3 ./runner.py Traceback (most recent call last): File "./runner.py", line 3, in from raisimGymTorch.helper.raisim_gym_helper import ConfigurationSaver, load_param, tensorboard_launcher File "/home/sangha/raisim_ws/raisimlib/raisimGymTorch/raisimGymTorch/helper/init.py", line 1, in from .raisim_gym_helper import File "/home/sangha/raisim_ws/raisimlib/raisimGymTorch/raisimGymTorch/helper/raisim_gym_helper.py", line 5, in import torch File "/usr/local/lib/python3.8/dist-packages/torch-1.13.0-py3.8-linux-x86_64.egg/torch/init.py", line 191, in _load_global_deps() File "/usr/local/lib/python3.8/dist-packages/torch-1.13.0-py3.8-linux-x86_64.egg/torch/init.py", line 153, in _load_global_deps ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL) File "/usr/lib/python3.8/ctypes/init.py", line 373, in init self._handle = _dlopen(self._name, mode) OSError: libcublas.so.11: cannot open shared object file: No such file or directory

Thank you.

SeungHunJeon commented 2 years ago

Please check the cuda version, also check the proper torch version with respect to current cuda.

torch error