安装stable_baselines时,mpi4py(setup.py)...的错误提示消息

时间:2019-08-19 16:08:09

标签: python python-3.x macos flow-project

提取流项目的最后一个提交后,我用python3.7.4执行green_wave.py,然后连续出现这些错误。

所有这些错误都是在执行运行mpi4py的setup.py安装...错误命令后发生的。

在此之下,您可以看到错误消息的摘要。

我该怎么办?

谢谢。

Ulass-MacBook-Pro:stable_baselines ulasbayram$ pip3 install stable_baselines==2.7.0
    Collecting stable_baselines==2.7.0
      Using cached https://files.pythonhosted.org/packages/52/9f/bbb2122cf2ce0e5f09a33bc35d504b83c05b0896bd46d4b85687c62557f6/stable_baselines-2.7.0-py3-none-any.whl
    Requirement already satisfied: joblib in /Users/ulasbayram/Detecon/lib/python3.7/site-packages (from stable_baselines==2.7.0) (0.10.3)
    Requirement already satisfied: opencv-python in /Users/ulasbayram/Detecon/lib/python3.7/site-packages (from stable_baselines==2.7.0) (4.1.0.25)
    Requirement already satisfied: cloudpickle>=0.5.5 in /Users/ulasbayram/Detecon/lib/python3.7/site-packages (from stable_baselines==2.7.0) (1.2.1)
    Requirement already satisfied: pandas in /Users/ulasbayram/Detecon/lib/python3.7/site-packages (from stable_baselines==2.7.0) (0.25.0)
    Requirement already satisfied: scipy in /Users/ulasbayram/Detecon/lib/python3.7/site-packages (from stable_baselines==2.7.0) (1.1.0)
    Requirement already satisfied: gym[atari,classic_control]>=0.10.9 in /Users/ulasbayram/Detecon/lib/python3.7/site-packages (from stable_baselines==2.7.0) (0.13.1)
    Collecting mpi4py (from stable_baselines==2.7.0)
      Using cached https://files.pythonhosted.org/packages/04/f5/a615603ce4ab7f40b65dba63759455e3da610d9a155d4d4cece1d8fd6706/mpi4py-3.0.2.tar.gz
    Requirement already satisfied: numpy in /Users/ulasbayram/Detecon/lib/python3.7/site-packages (from stable_baselines==2.7.0) (1.16.4)
    Requirement already satisfied: matplotlib in /Users/ulasbayram/Detecon/lib/python3.7/site-packages (from stable_baselines==2.7.0) (3.0.0)
    Requirement already satisfied: python-dateutil>=2.6.1 in /Users/ulasbayram/Detecon/lib/python3.7/site-packages (from pandas->stable_baselines==2.7.0) (2.7.3)
    Requirement already satisfied: pytz>=2017.2 in /Users/ulasbayram/Detecon/lib/python3.7/site-packages (from pandas->stable_baselines==2.7.0) (2019.2)
    Requirement already satisfied: pyglet<=1.3.2,>=1.2.0 in /Users/ulasbayram/Detecon/lib/python3.7/site-packages (from gym[atari,classic_control]>=0.10.9->stable_baselines==2.7.0) (1.3.2)
    Requirement already satisfied: six in /Users/ulasbayram/Detecon/lib/python3.7/site-packages (from gym[atari,classic_control]>=0.10.9->stable_baselines==2.7.0) (1.11.0)
    Requirement already satisfied: Pillow; extra == "atari" in /Users/ulasbayram/Detecon/lib/python3.7/site-packages (from gym[atari,classic_control]>=0.10.9->stable_baselines==2.7.0) (6.1.0)
    Requirement already satisfied: atari-py~=0.2.0; extra == "atari" in /Users/ulasbayram/Detecon/lib/python3.7/site-packages (from gym[atari,classic_control]>=0.10.9->stable_baselines==2.7.0) (0.2.6)
    Requirement already satisfied: cycler>=0.10 in /Users/ulasbayram/Detecon/lib/python3.7/site-packages (from matplotlib->stable_baselines==2.7.0) (0.10.0)
    Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /Users/ulasbayram/Detecon/lib/python3.7/site-packages (from matplotlib->stable_baselines==2.7.0) (2.4.2)
    Requirement already satisfied: kiwisolver>=1.0.1 in /Users/ulasbayram/Detecon/lib/python3.7/site-packages (from matplotlib->stable_baselines==2.7.0) (1.1.0)
    Requirement already satisfied: future in /Users/ulasbayram/Detecon/lib/python3.7/site-packages (from pyglet<=1.3.2,>=1.2.0->gym[atari,classic_control]>=0.10.9->stable_baselines==2.7.0) (0.17.1)
    Requirement already satisfied: setuptools in /Users/ulasbayram/Detecon/lib/python3.7/site-packages (from kiwisolver>=1.0.1->matplotlib->stable_baselines==2.7.0) (41.0.1)
    Building wheels for collected packages: mpi4py
      Building wheel for mpi4py (setup.py) ... error
      ERROR: Command errored out with exit status 1:
       command: /Users/ulasbayram/Detecon/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/y9/0xpl6pfx3cq9x9j9dzkgl22m0000gn/T/pip-install-5qgh61eu/mpi4py/setup.py'"'"'; __file__='"'"'/private/var/folders/y9/0xpl6pfx3cq9x9j9dzkgl22m0000gn/T/pip-install-5qgh61eu/mpi4py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/y9/0xpl6pfx3cq9x9j9dzkgl22m0000gn/T/pip-wheel-vy49j_1r --python-tag cp37
           cwd: /private/var/folders/y9/0xpl6pfx3cq9x9j9dzkgl22m0000gn/T/pip-install-5qgh61eu/mpi4py/
      Complete output (126 lines):
      running bdist_wheel
      running build
      running build_src
      running build_py
      creating build
      creating build/lib.macosx-10.14-x86_64-3.7
      creating build/lib.macosx-10.14-x86_64-3.7/mpi4py
      copying src/mpi4py/run.py -> build/lib.macosx-10.14-x86_64-3.7/mpi4py
      copying src/mpi4py/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/mpi4py
      copying src/mpi4py/bench.py -> build/lib.macosx-10.14-x86_64-3.7/mpi4py
      copying src/mpi4py/__main__.py -> build/lib.macosx-10.14-x86_64-3.7/mpi4py
      creating build/lib.macosx-10.14-x86_64-3.7/mpi4py/futures
      copying src/mpi4py/futures/_base.py -> build/lib.macosx-10.14-x86_64-3.7/mpi4py/futures
      copying src/mpi4py/futures/server.py -> build/lib.macosx-10.14-x86_64-3.7/mpi4py/futures
      copying src/mpi4py/futures/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/mpi4py/futures
      copying src/mpi4py/futures/pool.py -> build/lib.macosx-10.14-x86_64-3.7/mpi4py/futures
      copying src/mpi4py/futures/aplus.py -> build/lib.macosx-10.14-x86_64-3.7/mpi4py/futures
      copying src/mpi4py/futures/__main__.py -> build/lib.macosx-10.14-x86_64-3.7/mpi4py/futures
      copying src/mpi4py/futures/_lib.py -> build/lib.macosx-10.14-x86_64-3.7/mpi4py/futures
      copying src/mpi4py/__init__.pxd -> build/lib.macosx-10.14-x86_64-3.7/mpi4py
      copying src/mpi4py/libmpi.pxd -> build/lib.macosx-10.14-x86_64-3.7/mpi4py
      copying src/mpi4py/MPI.pxd -> build/lib.macosx-10.14-x86_64-3.7/mpi4py
      creating build/lib.macosx-10.14-x86_64-3.7/mpi4py/include
      creating build/lib.macosx-10.14-x86_64-3.7/mpi4py/include/mpi4py
      copying src/mpi4py/include/mpi4py/mpi4py.MPI.h -> build/lib.macosx-10.14-x86_64-3.7/mpi4py/include/mpi4py
      copying src/mpi4py/include/mpi4py/mpi4py.MPI_api.h -> build/lib.macosx-10.14-x86_64-3.7/mpi4py/include/mpi4py
      copying src/mpi4py/include/mpi4py/mpi4py.h -> build/lib.macosx-10.14-x86_64-3.7/mpi4py/include/mpi4py
      copying src/mpi4py/include/mpi4py/mpi4py.i -> build/lib.macosx-10.14-x86_64-3.7/mpi4py/include/mpi4py
      copying src/mpi4py/include/mpi4py/mpi.pxi -> build/lib.macosx-10.14-x86_64-3.7/mpi4py/include/mpi4py
      running build_clib
      MPI configuration: [mpi] from 'mpi.cfg'
      checking for library 'lmpe' ...

    .
    .
    .


    ERROR: Command errored out with exit status 1: /Users/ulasbayram/Detecon/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/y9/0xpl6pfx3cq9x9j9dzkgl22m0000gn/T/pip-install-5qgh61eu/mpi4py/setup.py'"'"'; __file__='"'"'/private/var/folders/y9/0xpl6pfx3cq9x9j9dzkgl22m0000gn/T/pip-install-5qgh61eu/mpi4py/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/y9/0xpl6pfx3cq9x9j9dzkgl22m0000gn/T/pip-record-xbd7wnrr/install-record.txt --single-version-externally-managed --compile --install-headers /Users/ulasbayram/Detecon/bin/../include/site/python3.7/mpi4py Check the logs for full command output.

1 个答案:

答案 0 :(得分:0)

在运行pip安装之前,是否确保遵循安装说明来获得稳定的基准?也就是说,您在运行此命令之前是否运行过“ brew install cmake openmpi”?该错误可能是由于您没有安装MPI。