簡體   English   中英

MuJoCo 在 Windows 10 上構建錯誤

[英]MuJoCo build errors on Windows 10

運行 Windows 10 Python 3.10,嘗試運行 OpenAI Gym 人形示例: humanoid.py

懷疑與 Cython 和 C 編譯器有關。

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

Gym 最近改變了他們在新環境中依賴 MuJoCo 的方式,這種方式不需要 mujoco-py 和 cython。

我不知道您的具體問題是什么,但如果您願意切換到新版本的環境( humanoid_v4.py ),您可能不會遇到它。

請參閱Open AI README中的詳細信息:

要安裝最新的健身房 MuJoCo 環境的依賴項,請使用pip install gym[mujoco]

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM