首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Windows 10上的MuJoCo构建错误

Windows 10上的MuJoCo构建错误
EN

Stack Overflow用户
提问于 2022-08-11 16:24:44
回答 1查看 294关注 0票数 0

运行Windows10Python3.10,尝试运行OpenAI Gym类人示例:humanoid.py

怀疑与Cython和C编译器有关。

代码语言:javascript
运行
复制
PS C:\mayhem\gym\gym\envs\mujoco> python .\humanoid.py
C:\Users\Joe\AppData\Local\Programs\Python\Python310\lib\site-packages\mujoco_py\builder.py:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
import distutils
C:\Users\Joe\AppData\Local\Programs\Python\Python310\lib\site-packages\mujoco_py\builder.py:9: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
from distutils.sysconfig import customize_compiler
running build_ext
building 'mujoco_py.cymj' extension
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\Joe\AppData\Local\Programs\Python\Python310\lib\site-packages\mujoco_py -IC:\Users\Joe\.mujoco\mujoco210\include -IC:\Users\Joe\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\core\include -IC:\Users\Joe\AppData\Local\Programs\Python\Python310\include -IC:\Users\Joe\AppData\Local\Programs\Python\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /TcC:\Users\Joe\AppData\Local\Programs\Python\Python310\lib\site-packages\mujoco_py/gl/dummyshim.c /FoC:\Users\Joe\AppData\Local\Programs\Python\Python310\lib\site-packages\mujoco_py\generated\_pyxbld_2.1.2.14_310_windowsextensionbuilder\temp.win-amd64-3.10\Release\Users\Joe\AppData\Local\Programs\Python\Python310\lib\site-packages\mujoco_py/gl/dummyshim.obj -fopenmp -w
cl : Command line warning D9025 : overriding '/W3' with '/w'
cl : Command line warning D9002 : ignoring unknown option '-fopenmp'
dummyshim.c
C:\Users\Joe\AppData\Local\Programs\Python\Python310\lib\site-packages\mujoco_py\gl\glshim.h(4): fatal error C1083: Cannot open include file: 'mujoco.h': No such file or directory
Traceback (most recent call last):
File "C:\Users\Joe\AppData\Local\Programs\Python\Python310\lib\distutils\_msvccompiler.py", line 401, in compile
    self.spawn(args)
File "C:\Users\Joe\AppData\Local\Programs\Python\Python310\lib\distutils\_msvccompiler.py", line 507, in spawn
    return super().spawn(cmd)
File "C:\Users\Joe\AppData\Local\Programs\Python\Python310\lib\distutils\ccompiler.py", line 910, in spawn
    spawn(cmd, dry_run=self.dry_run)
File "C:\Users\Joe\AppData\Local\Programs\Python\Python310\lib\distutils\spawn.py", line 91, in spawn
    raise DistutilsExecError(
distutils.errors.DistutilsExecError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\mayhem\gym\gym\envs\mujoco\humanoid.py", line 4, in <module>
    from gym.envs.mujoco import MuJocoPyEnv
...
File "C:\Users\Joe\AppData\Local\Programs\Python\Python310\lib\distutils\_msvccompiler.py", line 403, in compile
    raise CompileError(msg)
distutils.errors.CompileError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
EN

回答 1

Stack Overflow用户

发布于 2022-08-12 09:37:21

健身房最近改变了他们在新环境中依赖MuJoCo的方式,这种方式不需要mujoco和cython。

我不知道您的具体问题是什么,但是如果您愿意切换到新版本的环境(v4.py),您可能不会遇到它。

参见开放AI自述中的详细信息

要安装最新的健身房MuJoCo环境的依赖项,请使用pip install gym[mujoco]

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73324036

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档