openai / EPG

Code for the paper "Evolved Policy Gradients"

Home Page:https://arxiv.org/abs/1802.04821

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error while running

TigerStone93 opened this issue · comments

when I launched with code PYTHONPATH=. python epg/launch_local.py

encountered errors

/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
Traceback (most recent call last):
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/distutils/unixccompiler.py", line 196, in link
self.spawn(linker + ld_args)
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "epg/launch_local.py", line 9, in
from epg.envs.random_robots import RandomHopper, DirHopper, NormalHopper
File "/home/tigerstone/Desktop/EPG_master/epg/envs/random_robots.py", line 6, in
from epg.envs.mujoco.hopper import RandomWeightHopperEnv, RandomWeightHopperDirEnv, NormalHopperEnv
File "/home/tigerstone/Desktop/EPG_master/epg/envs/mujoco/hopper.py", line 5, in
from gym.envs.mujoco import MujocoEnv, HopperEnv
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/site-packages/gym/envs/mujoco/init.py", line 1, in
from gym.envs.mujoco.mujoco_env import MujocoEnv
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/site-packages/gym/envs/mujoco/mujoco_env.py", line 12, in
import mujoco_py
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/site-packages/mujoco_py/init.py", line 3, in
from mujoco_py.builder import cymj, ignore_mujoco_warnings, functions, MujocoException
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/site-packages/mujoco_py/builder.py", line 506, in
cymj = load_cython_ext(mujoco_path)
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/site-packages/mujoco_py/builder.py", line 105, in load_cython_ext
cext_so_path = builder.build()
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/site-packages/mujoco_py/builder.py", line 221, in build
built_so_file_path = self._build_impl()
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/site-packages/mujoco_py/builder.py", line 273, in _build_impl
so_file_path = super()._build_impl()
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/site-packages/mujoco_py/builder.py", line 244, in _build_impl
dist.run_commands()
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/site-packages/mujoco_py/builder.py", line 144, in build_extensions
build_ext.build_extensions(self)
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/distutils/command/build_ext.py", line 558, in build_extension
target_lang=language)
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/distutils/ccompiler.py", line 717, in link_shared_object
extra_preargs, extra_postargs, build_temp, target_lang)
File "/home/tigerstone/anaconda3/envs/epg/lib/python3.6/distutils/unixccompiler.py", line 198, in link
raise LinkError(msg)
distutils.errors.LinkError: command 'gcc' failed with exit status 1

How can I solve this?

sudo apt-get update
sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev
works for me