Python 如何解决;错误:为doom py构建控制盘失败;
我遵循一个教程,要求我安装ppaquette-gym-doom。但是我不断地得到一个错误Python 如何解决;错误:为doom py构建控制盘失败;,python,macos,pip,openai-gym,Python,Macos,Pip,Openai Gym,我遵循一个教程,要求我安装ppaquette-gym-doom。但是我不断地得到一个错误 ERROR: Failed building wheel for doom-py 我在MacBook上,在Python3.6中使用anaconda环境 我试图安装错误代码中说我需要的软件包 brew安装boost python sdl2 pip安装cmake 但是,这无助于修复错误。我也尝试在Python2.7上这样做,但它也不起作用 这是全部错误 ERROR: Failed building wheel
ERROR: Failed building wheel for doom-py
我在MacBook上,在Python3.6中使用anaconda环境
我试图安装错误代码中说我需要的软件包
brew安装boost python sdl2
pip安装cmake
但是,这无助于修复错误。我也尝试在Python2.7上这样做,但它也不起作用
这是全部错误
ERROR: Failed building wheel for doom-py
...
ERROR: Command errored out with exit status 1:
command: /Users/user/anaconda3/envs/DoomAi/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/8v/645qcxqj4lzbth2zf4x8dfcm0000gn/T/pip-install-hwwmtp15/doom-py/setup.py'"'"'; __file__='"'"'/private/var/folders/8v/645qcxqj4lzbth2zf4x8dfcm0000gn/T/pip-install-hwwmtp15/doom-py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/8v/645qcxqj4lzbth2zf4x8dfcm0000gn/T/pip-record-kij0gfeh/install-record.txt --single-version-externally-managed --compile
cwd: /private/var/folders/8v/645qcxqj4lzbth2zf4x8dfcm0000gn/T/pip-install-hwwmtp15/doom-py/
Complete output (137 lines):
running install
running build
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
-- Boost version: 1.70.0
-- Found the following Boost libraries:
-- filesystem
-- thread
-- system
-- date_time
-- chrono
-- regex
-- iostreams
-- atomic
CMake Deprecation Warning at cmake_modules/CreateLaunchers.cmake:48 (cmake_policy):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
src/vizdoom/CMakeLists.txt:13 (include)
-- Could NOT find GME (missing: GME_LIBRARIES GME_INCLUDE_DIR)
-- Using system zlib
-- Using system jpeg library
-- Using system bzip2 library
-- Using internal gme library
-- /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include
-- /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include
-- /private/var/folders/8v/645qcxqj4lzbth2zf4x8dfcm0000gn/T/pip-install-hwwmtp15/doom-py/doom_py/src/vizdoom/lzma/C
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could not find FMOD include files
-- Could NOT find MPG123 (missing: MPG123_LIBRARIES MPG123_INCLUDE_DIR)
-- Could NOT find FluidSynth (missing: FLUIDSYNTH_LIBRARIES FLUIDSYNTH_INCLUDE_DIR)
-- Boost version: 1.70.0
-- Found the following Boost libraries:
-- thread
-- system
-- date_time
-- chrono
-- atomic
-- Fluid synth libs: FLUIDSYNTH_LIBRARIES-NOTFOUND
-- Using python library: /Users/user/anaconda3/envs/DoomAi/lib/libpython3.6m.dylib
-- Using python include: /Users/user/anaconda3/envs/DoomAi/include/python3.6m
CMake Warning at /Users/user/anaconda3/envs/DoomAi/lib/python3.6/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.14/Modules/FindBoost.cmake:1822 (message):
No header defined for python-py368; skipping header check
Call Stack (most recent call first):
CMakeLists.txt:124 (find_package)
-- Could NOT find Boost
CMake Warning at /Users/user/anaconda3/envs/DoomAi/lib/python3.6/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.14/Modules/FindBoost.cmake:1822 (message):
No header defined for python-py36; skipping header check
Call Stack (most recent call first):
CMakeLists.txt:133 (find_package)
-- Could NOT find Boost
-- Boost library python-py36:
-- Could NOT find Boost
-- Boost library python36:
CMake Warning at /Users/user/anaconda3/envs/DoomAi/lib/python3.6/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.14/Modules/FindBoost.cmake:1822 (message):
No header defined for python-py3; skipping header check
Call Stack (most recent call first):
CMakeLists.txt:133 (find_package)
-- Could NOT find Boost
-- Boost library python-py3:
-- Could NOT find Boost
-- Boost library python3:
CMake Error at /Users/user/anaconda3/envs/DoomAi/lib/python3.6/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.14/Modules/FindBoost.cmake:2155 (message):
Unable to find the requested Boost libraries.
Boost version: 1.70.0
Boost include path: /usr/local/include
Could not find the following Boost libraries:
boost_python
No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the
directory containing Boost libraries or BOOST_ROOT to the location of
Boost.
Call Stack (most recent call first):
CMakeLists.txt:151 (find_package)
-- Found components for NumPy
-- NUMPY_ROOT_DIR = /usr/local
-- NUMPY_INCLUDES = /Users/user/anaconda3/envs/DoomAi/lib/python3.6/site-packages/numpy/core/include
-- NUMPY_LIBRARIES = /Users/user/anaconda3/envs/DoomAi/lib/python3.6/site-packages/numpy/core/lib/libnpymath.a
-- NUMPY_API_VERSION = 1.16.4
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/8v/645qcxqj4lzbth2zf4x8dfcm0000gn/T/pip-install-hwwmtp15/doom-py/doom_py/CMakeFiles/CMakeOutput.log".
See also "/private/var/folders/8v/645qcxqj4lzbth2zf4x8dfcm0000gn/T/pip-install-hwwmtp15/doom-py/doom_py/CMakeFiles/CMakeError.log".
Could not build doom-py: Command '['cmake', '-DCMAKE_BUILD_TYPE=Release', '-DBUILD_PYTHON=ON', '-DBUILD_JAVA=OFF', '-DPYTHON_EXECUTABLE:FILEPATH=/Users/user/anaconda3/envs/DoomAi/bin/python', '-DOSX_COCOA_BACKEND=OFF']' returned non-zero exit status 1.. (HINT: are you sure cmake is installed? You might also be missing a library. doom_py requires boost, boost-python, sdl2 on OSX (installable via 'brew install boost boost-python sdl2')
...
ERROR: Command errored out with exit status 1: /Users/user/anaconda3/envs/DoomAi/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/8v/645qcxqj4lzbth2zf4x8dfcm0000gn/T/pip-install-hwwmtp15/doom-py/setup.py'"'"'; __file__='"'"'/private/var/folders/8v/645qcxqj4lzbth2zf4x8dfcm0000gn/T/pip-install-hwwmtp15/doom-py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/8v/645qcxqj4lzbth2zf4x8dfcm0000gn/T/pip-record-kij0gfeh/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
在为自制Python构建此应用程序时,您可能会有更多的运气(在virtualenv中,您可以在以后干净地删除它们) 由于不再维护此包,代码可能已过时和/或不可用。例如,在满足所有依赖项后,我最终得到一个编译错误,表明
doom py
与Anaconda中提供的最新版本的boost
不兼容
为水蟒建造物品时,您需要记住两件事:
- Anaconda使用自己的编译器工具链和一组组件,并试图将它们与系统的其余部分隔离开来。因此您需要将任何需求专门安装到Anaconda的环境中,而不仅仅是安装到系统中
- 将
与conda
混合始终是一种危险,因为他们无法管理彼此的软件包,因此当您得到冲突的文件集时,您最终肯定会破坏设置(不过您可以从头开始重新创建)。此外,Anaconda将补丁应用于Python和其他一些软件包,因此同一软件包的conda和pip版本并不总是兼容的。pip
- 因此,
包应该优先于conda
包,因为它们不太可能以不可预知的方式破坏事物pip
- 因此,
根据,您需要以下依赖项: 由于您正试图在另一个环境中构建—该软件包不是为AFAIC设计的,因此所有赌注都没有了--您需要找到这些依赖项--它们可能有不同的名称,因此您需要猜测--(如果在那里找不到某些内容,则必须从源代码构建它)。 例如(链接具有安装命令):
- boost python:
- sdl2:
- 其他可从标准频道获得
自制核心中
:
$ for l in cmake zlib libjpeg sdl2 boost; do brew search $l; done
==> Formulae
cmake
==> Casks
homebrew/cask/cmake
==> Formulae
lzlib zlib homebrew/portable-ruby/portable-zlib
==> Formulae
libjpeg libjpeg-turbo
==> Formulae
sdl2 sdl2_gfx sdl2_image sdl2_mixer sdl2_net sdl2_ttf
==> Formulae
boost boost-build boost-python boost-python@1.59 boost@1.57 boost@1.60
boost-bcp boost-mpi boost-python3 boost@1.55 boost@1.59
==> Casks
homebrew/cask/turbo-boost-switcher
它曾经说,
boostpython
还有一次boostpython
你只是想安装ppaquette gym doom?你是否遵循了说明?如果pip无法正常工作,你也可以手动下载存储库并运行python setup.py安装cmake
不是python程序。“pip install cmake
”没有任何意义。上的注释说:“这个环境不再维护,并且使用旧版本的VizDoom。”你的教程可能已经过时了。
$ for l in cmake zlib libjpeg sdl2 boost; do brew search $l; done
==> Formulae
cmake
==> Casks
homebrew/cask/cmake
==> Formulae
lzlib zlib homebrew/portable-ruby/portable-zlib
==> Formulae
libjpeg libjpeg-turbo
==> Formulae
sdl2 sdl2_gfx sdl2_image sdl2_mixer sdl2_net sdl2_ttf
==> Formulae
boost boost-build boost-python boost-python@1.59 boost@1.57 boost@1.60
boost-bcp boost-mpi boost-python3 boost@1.55 boost@1.59
==> Casks
homebrew/cask/turbo-boost-switcher