- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在学习需要安装 ppaquette-gym-doom 的教程。但是我不断收到错误,
ERROR: Failed building wheel for doom-py
我在 MacBook 上使用 python 3.6 中的 anaconda 环境。
我尝试安装错误代码指出我需要的软件包,
brew install boost boost-python sdl2
pip 安装 cmake
然而,这并没有帮助修复错误。我也尝试在 python 2.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.
最佳答案
您可能会更幸运地为 Homebrew Python 构建它(在 virtualenv 中以便以后能够干净地删除它们)。
由于不再维护此包,代码可能已过时和/或无法使用。在满足所有依赖项后,我最终得到一个编译错误,提示 doom-py
与 Anaconda 中可用的最新版本 boost
不兼容。
在为 Anaconda 构建东西时,您需要记住两件事:
conda
与 pip
混合使用总是有风险,因为它们无法管理彼此的包,因此您势必会破坏您的设置最终当你得到冲突的文件集时(你将能够从头开始重新创建它)。此外,Anaconda 对 Python 和其他一些包进行了补丁,因此同一包的 conda 和 pip 版本并不总是兼容。
conda
包应该优于 pip
包——从某种意义上说,它们不太可能以不可预测的方式破坏事物。根据 https://github.com/ppaquette/gym-doom#dependencies ,您需要以下依赖项:
python-numpy cmake zlib1g-dev libjpeg-dev libboost-all-dev gcc libsdl2-dev wget unzip git
由于您正在尝试在另一个环境中构建——该包不是为 AFAICS 设计的,所以所有的赌注都没有了——您需要找到这些依赖项——它们可能有不同的名称,所以您需要猜测——在 Anaconda Cloud 中并将它们安装到您的 Anaconda 环境中(如果在那里找不到某些东西,您必须从源代码构建它)。
例如(链接有安装命令):
请注意,上述某些软件包来自不同的非官方 channel ,因此它们可能彼此不完全兼容。
在 Homebrew 中,它们都存在于 homebrew-core
中:
$ 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
关于python - "ERROR: Failed building wheel for doom-py"如何解决,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57170181/
我正在处理一组标记为 160 个组的 173k 点。我想通过合并最接近的(到 9 或 10 个组)来减少组/集群的数量。我搜索过 sklearn 或类似的库,但没有成功。 我猜它只是通过 knn 聚类
我有一个扁平数字列表,这些数字逻辑上以 3 为一组,其中每个三元组是 (number, __ignored, flag[0 or 1]),例如: [7,56,1, 8,0,0, 2,0,0, 6,1,
我正在使用 pipenv 来管理我的包。我想编写一个 python 脚本来调用另一个使用不同虚拟环境(VE)的 python 脚本。 如何运行使用 VE1 的 python 脚本 1 并调用另一个 p
假设我有一个文件 script.py 位于 path = "foo/bar/script.py"。我正在寻找一种在 Python 中通过函数 execute_script() 从我的主要 Python
这听起来像是谜语或笑话,但实际上我还没有找到这个问题的答案。 问题到底是什么? 我想运行 2 个脚本。在第一个脚本中,我调用另一个脚本,但我希望它们继续并行,而不是在两个单独的线程中。主要是我不希望第
我有一个带有 python 2.5.5 的软件。我想发送一个命令,该命令将在 python 2.7.5 中启动一个脚本,然后继续执行该脚本。 我试过用 #!python2.7.5 和http://re
我在 python 命令行(使用 python 2.7)中,并尝试运行 Python 脚本。我的操作系统是 Windows 7。我已将我的目录设置为包含我所有脚本的文件夹,使用: os.chdir("
剧透:部分解决(见最后)。 以下是使用 Python 嵌入的代码示例: #include int main(int argc, char** argv) { Py_SetPythonHome
假设我有以下列表,对应于及时的股票价格: prices = [1, 3, 7, 10, 9, 8, 5, 3, 6, 8, 12, 9, 6, 10, 13, 8, 4, 11] 我想确定以下总体上最
所以我试图在选择某个单选按钮时更改此框架的背景。 我的框架位于一个类中,并且单选按钮的功能位于该类之外。 (这样我就可以在所有其他框架上调用它们。) 问题是每当我选择单选按钮时都会出现以下错误: co
我正在尝试将字符串与 python 中的正则表达式进行比较,如下所示, #!/usr/bin/env python3 import re str1 = "Expecting property name
考虑以下原型(prototype) Boost.Python 模块,该模块从单独的 C++ 头文件中引入类“D”。 /* file: a/b.cpp */ BOOST_PYTHON_MODULE(c)
如何编写一个程序来“识别函数调用的行号?” python 检查模块提供了定位行号的选项,但是, def di(): return inspect.currentframe().f_back.f_l
我已经使用 macports 安装了 Python 2.7,并且由于我的 $PATH 变量,这就是我输入 $ python 时得到的变量。然而,virtualenv 默认使用 Python 2.6,除
我只想问如何加快 python 上的 re.search 速度。 我有一个很长的字符串行,长度为 176861(即带有一些符号的字母数字字符),我使用此函数测试了该行以进行研究: def getExe
list1= [u'%app%%General%%Council%', u'%people%', u'%people%%Regional%%Council%%Mandate%', u'%ppp%%Ge
这个问题在这里已经有了答案: Is it Pythonic to use list comprehensions for just side effects? (7 个答案) 关闭 4 个月前。 告
我想用 Python 将两个列表组合成一个列表,方法如下: a = [1,1,1,2,2,2,3,3,3,3] b= ["Sun", "is", "bright", "June","and" ,"Ju
我正在运行带有最新 Boost 发行版 (1.55.0) 的 Mac OS X 10.8.4 (Darwin 12.4.0)。我正在按照说明 here构建包含在我的发行版中的教程 Boost-Pyth
学习 Python,我正在尝试制作一个没有任何第 3 方库的网络抓取工具,这样过程对我来说并没有简化,而且我知道我在做什么。我浏览了一些在线资源,但所有这些都让我对某些事情感到困惑。 html 看起来
我是一名优秀的程序员,十分优秀!