RuntimeError: Could not find GCC executable.

今天使用paddle的parl的ddpg时候,出现了下面的问题:

[03-01 18:44:43 MainThread @logger.py:242] Argv: train.py
[03-01 18:44:43 MainThread @utils.py:79] WRN paddlepaddle version: 2.0.0. The dynamic graph version of PARL is under development, not fully tested and supported
[03-01 18:44:44 MainThread @train.py:85] ------------------ DDPG ---------------------
[03-01 18:44:44 MainThread @train.py:86] Env: HalfCheetah-v1, Seed: 0
[03-01 18:44:44 MainThread @train.py:87] ---------------------------------------------
[2021-03-01 18:44:44,184] Making new env: HalfCheetah-v1
/Users/wugaosheng/anaconda3/lib/python3.7/site-packages/gym/envs/registration.py:17: PkgResourcesDeprecationWarning: Parameters to load are deprecated.  Call .resolve and .require separately.
  result = entry_point.load(False)
Traceback (most recent call last):
  File "train.py", line 145, in <module>
    main()
  File "train.py", line 90, in main
    env = gym.make(args.env)
  File "/Users/wugaosheng/anaconda3/lib/python3.7/site-packages/gym/envs/registration.py", line 161, in make
    return registry.make(id)
  File "/Users/wugaosheng/anaconda3/lib/python3.7/site-packages/gym/envs/registration.py", line 119, in make
    env = spec.make()
  File "/Users/wugaosheng/anaconda3/lib/python3.7/site-packages/gym/envs/registration.py", line 85, in make
    cls = load(self._entry_point)
  File "/Users/wugaosheng/anaconda3/lib/python3.7/site-packages/gym/envs/registration.py", line 17, in load
    result = entry_point.load(False)
  File "/Users/wugaosheng/anaconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2434, in load
    return self.resolve()
  File "/Users/wugaosheng/anaconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2440, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Users/wugaosheng/anaconda3/lib/python3.7/site-packages/gym/envs/mujoco/__init__.py", line 1, in <module>
    from gym.envs.mujoco.mujoco_env import MujocoEnv
  File "/Users/wugaosheng/anaconda3/lib/python3.7/site-packages/gym/envs/mujoco/mujoco_env.py", line 11, in <module>
    import mujoco_py
  File "/Users/wugaosheng/anaconda3/lib/python3.7/site-packages/mujoco_py/__init__.py", line 3, in <module>
    from mujoco_py.builder import cymj, ignore_mujoco_warnings, functions, MujocoException
  File "/Users/wugaosheng/anaconda3/lib/python3.7/site-packages/mujoco_py/builder.py", line 506, in <module>
    cymj = load_cython_ext(mujoco_path)
  File "/Users/wugaosheng/anaconda3/lib/python3.7/site-packages/mujoco_py/builder.py", line 105, in load_cython_ext
    cext_so_path = builder.build()
  File "/Users/wugaosheng/anaconda3/lib/python3.7/site-packages/mujoco_py/builder.py", line 221, in build
    built_so_file_path = self._build_impl()
  File "/Users/wugaosheng/anaconda3/lib/python3.7/site-packages/mujoco_py/builder.py", line 325, in _build_impl
    'Could not find GCC executable.\n\n'
RuntimeError: Could not find GCC executable.

HINT: On OS X, install GCC with `brew install gcc`. or `port install gcc`.

解决方法

brew install gcc@7

我最初的是10,降到7就行了。

参考文献

Mujoco_py support for latest GCC compiler

你可能感兴趣的:(python学习)