failed to check the installation with mujoco envs
See original GitHub issueI’m using Ubuntu 14.04 + Python 3.6.7 (Anaconda3-5.3.0-Linux-x86_64).
I have successfully installed mujoco, mujoco_py, gym and spinningup.
mujoco 150
mujoco-py 1.50.1.68
gym 0.10.9
spinup 0.1
And the following code could work:
env = gym.make('Humanoid-v2')
env.reset()
env.render()
But when I checked the spinningup installation by:
python -m spinup.run ppo --hid [32,32] --env Walker2d-v2 --exp_name installtest
I got the following errors:
Import error. Trying to rebuild mujoco_py. running build_ext building ‘mujoco_py.cymj’ extension gcc -pthread -B /home/pxlong/anaconda3/envs/spinningup/compiler_compat -Wl,–sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/mujoco_py-1.50.1.68-py3.6.egg/mujoco_py -I/home/pxlong/.mujoco/mjpro150/include -I/home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/numpy/core/include -I/home/pxlong/anaconda3/envs/spinningup/include/python3.6m -c /home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/mujoco_py-1.50.1.68-py3.6.egg/mujoco_py/cymj.c -o /home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/mujoco_py-1.50.1.68-py3.6.egg/mujoco_py/generated/_pyxbld_1.50.1.68_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/mujoco_py-1.50.1.68-py3.6.egg/mujoco_py/cymj.o -fopenmp -w gcc -pthread -B /home/pxlong/anaconda3/envs/spinningup/compiler_compat -Wl,–sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/mujoco_py-1.50.1.68-py3.6.egg/mujoco_py -I/home/pxlong/.mujoco/mjpro150/include -I/home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/numpy/core/include -I/home/pxlong/anaconda3/envs/spinningup/include/python3.6m -c /home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/mujoco_py-1.50.1.68-py3.6.egg/mujoco_py/gl/osmesashim.c -o /home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/mujoco_py-1.50.1.68-py3.6.egg/mujoco_py/generated/_pyxbld_1.50.1.68_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/mujoco_py-1.50.1.68-py3.6.egg/mujoco_py/gl/osmesashim.o -fopenmp -w gcc -pthread -shared -B /home/pxlong/anaconda3/envs/spinningup/compiler_compat -L/home/pxlong/anaconda3/envs/spinningup/lib -Wl,-rpath=/home/pxlong/anaconda3/envs/spinningup/lib -Wl,–no-as-needed -Wl,–sysroot=/ /home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/mujoco_py-1.50.1.68-py3.6.egg/mujoco_py/generated/_pyxbld_1.50.1.68_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/mujoco_py-1.50.1.68-py3.6.egg/mujoco_py/cymj.o /home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/mujoco_py-1.50.1.68-py3.6.egg/mujoco_py/generated/_pyxbld_1.50.1.68_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/mujoco_py-1.50.1.68-py3.6.egg/mujoco_py/gl/osmesashim.o -L/home/pxlong/.mujoco/mjpro150/bin -Wl,-R/home/pxlong/.mujoco/mjpro150/bin -lmujoco150 -lglewosmesa -lOSMesa -lGL -o /home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/mujoco_py-1.50.1.68-py3.6.egg/mujoco_py/generated/_pyxbld_1.50.1.68_36_linuxcpuextensionbuilder/lib.linux-x86_64-3.6/mujoco_py/cymj.cpython-36m-x86_64-linux-gnu.so -fopenmp Traceback (most recent call last): File “/home/pxlong/Dropbox/git/gym/gym/envs/mujoco/mujoco_env.py”, line 11, in <module> import mujoco_py File “/home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/mujoco_py-1.50.1.68-py3.6.egg/mujoco_py/init.py”, line 3, in <module> from mujoco_py.builder import cymj, ignore_mujoco_warnings, functions, MujocoException File “/home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/mujoco_py-1.50.1.68-py3.6.egg/mujoco_py/builder.py”, line 503, in <module> cymj = load_cython_ext(mjpro_path) File “/home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/mujoco_py-1.50.1.68-py3.6.egg/mujoco_py/builder.py”, line 106, in load_cython_ext mod = load_dynamic_ext(‘cymj’, cext_so_path) File “/home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/mujoco_py-1.50.1.68-py3.6.egg/mujoco_py/builder.py”, line 124, in load_dynamic_ext return loader.load_module() ImportError: dlopen: cannot load any more object with static TLS
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File “/home/pxlong/Dropbox/git/spinningup/spinup/utils/run_entrypoint.py”, line 11, in <module> thunk() File “/home/pxlong/Dropbox/git/spinningup/spinup/utils/run_utils.py”, line 162, in thunk_plus thunk(**kwargs) File “/home/pxlong/Dropbox/git/spinningup/spinup/algos/ppo/ppo.py”, line 175, in ppo env = env_fn() File “/home/pxlong/Dropbox/git/spinningup/spinup/utils/run_utils.py”, line 155, in <lambda> kwargs[‘env_fn’] = lambda : gym.make(env_name) File “/home/pxlong/Dropbox/git/gym/gym/envs/registration.py”, line 167, in make return registry.make(id) File “/home/pxlong/Dropbox/git/gym/gym/envs/registration.py”, line 119, in make env = spec.make() File “/home/pxlong/Dropbox/git/gym/gym/envs/registration.py”, line 85, in make cls = load(self._entry_point) File “/home/pxlong/Dropbox/git/gym/gym/envs/registration.py”, line 14, in load result = entry_point.load(False) File “/home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/pkg_resources/init.py”, line 2343, in load return self.resolve() File “/home/pxlong/anaconda3/envs/spinningup/lib/python3.6/site-packages/pkg_resources/init.py”, line 2349, in resolve module = import(self.module_name, fromlist=[‘name’], level=0) File “/home/pxlong/Dropbox/git/gym/gym/envs/mujoco/init.py”, line 1, in <module> from gym.envs.mujoco.mujoco_env import MujocoEnv File “/home/pxlong/Dropbox/git/gym/gym/envs/mujoco/mujoco_env.py”, line 13, in <module> raise error.DependencyNotInstalled(“{}. (HINT: you need to install mujoco_py, and also perform the setup instructions here: https://github.com/openai/mujoco-py/.)”.format(e)) gym.error.DependencyNotInstalled: dlopen: cannot load any more object with static TLS. (HINT: you need to install mujoco_py, and also perform the setup instructions here: https://github.com/openai/mujoco-py/.)
================================================================================ There appears to have been an error in your experiment. Check the traceback above to see what actually went wrong. The traceback below, included for completeness (but probably not useful for diagnosing the error), shows the stack leading up to the experiment launch. ================================================================================
Traceback (most recent call last): File “/home/pxlong/anaconda3/envs/spinningup/lib/python3.6/runpy.py”, line 193, in _run_module_as_main “main”, mod_spec) File “/home/pxlong/anaconda3/envs/spinningup/lib/python3.6/runpy.py”, line 85, in _run_code exec(code, run_globals) File “/home/pxlong/Dropbox/git/spinningup/spinup/run.py”, line 230, in <module> parse_and_execute_grid_search(cmd, args) File “/home/pxlong/Dropbox/git/spinningup/spinup/run.py”, line 162, in parse_and_execute_grid_search eg.run(algo, **run_kwargs) File “/home/pxlong/Dropbox/git/spinningup/spinup/utils/run_utils.py”, line 546, in run data_dir=data_dir, datestamp=datestamp, **var) File “/home/pxlong/Dropbox/git/spinningup/spinup/utils/run_utils.py”, line 171, in call_experiment subprocess.check_call(cmd, env=os.environ) File “/home/pxlong/anaconda3/envs/spinningup/lib/python3.6/subprocess.py”, line 291, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command ‘[‘python’, ‘/home/pxlong/Dropbox/git/spinningup/spinup/utils/run_entrypoint.py’, ‘eJyNUs9P1EAUnm6XpYCgEaORE4mX5eCWkHgDLmu8NOGAJp7MpNuZtmOnM7Uzg2BCYoLAkky88PTiP+vrLgLe6KTT977X7/3+3v81Dcns8S8yqR1rRFZJProng1+juZCS5k5lVmgF1zAsiX9M67Ti1FR8bkIY0VU6cUJaoag9aThiPhprxj90yjkcwjAhsxMm6+N3LJj2qkG7zXqMSHKFGgtekitySS6DvMdC1v8RIbawSzrLHrHBNDwLAjLt54j8RImR9wSGBz7i6oiqtOaQkHLpX5AeBlmeBp/JlJwF+OPBOfh+lzWmsuX34lLXPG6OpVZF/LbVzUQfx4WwsWmEUkIVrpmJ+HFWSBO3TtGZNGpOsLBdmdYTlu5D8mdMoFzxYXFSwwVsWSzUv8lSbBo/bngraq7saFdqhMz+yJZOVbSRztxht778oCslV2ChXPdR3Qia67bq3JZP/PIdF5Lf4zXSi4LuPA0GYRQiufqatoUBv6hcTbPGgV+YUeASEyzXL6DLLQlPUT+EUxj6xULqCaaASrnhn8/rHc2r7IJbrdFYblyD8RHjeeqkNXDg+0xkFkl+UGvmujX5n3vbK9wf3CbjWk6PUum4gU8wxMjYr5WPqax4u8NeH+2AX0ozepM+un1UCsa4okZ8m1OSzWSTG983nDOcsl+Vuih4e0cZ+mXtbOMsZaIFP37IeFlq01goY3FWlht7X6ZmG4eMA5wvll+5ZwPnksA/u6k4lYXGnWh094IPu/sauI++uFTOya8esA3g7OHoL/bmT1k=’]’ returned non-zero exit status 1.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top GitHub Comments
@pxlong oh geez this tensorflow bug is fun. what version of tensorflow are you using?
The root of the error is here
It turns out tensorflow allocates a bunch of limited resources normally shared by dynamically loaded libraries, so it’s sometimes possible to run out of them if tensorflow is loaded too late. Importing tensorflow earlier in the load process seems to fix the problem.
If you want to read about the bug here’s the thread https://github.com/tensorflow/tensorflow/issues/19010#issuecomment-386846086
Other solutions include updating to a more recent ubuntu or increasing the number of TLS slots.
I will update my OS to 16.04 and test it again. Many thx.