python - 无法安装 Python 包

标签 python windows pip mingw anaconda

在尝试通过 pip 安装 python 包时出现错误:

  Failed building wheel for atari-py
  Running setup.py clean for atari-py
Failed to build atari-py
Installing collected packages: atari-py, PyOpenGL
  Running setup.py install for atari-py ... error
    Complete output from command C:\Users\xxxxxx\AppData\Local\Continuum\Anaconda2\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\xxxxxx\\appdata\\local\\temp\\pip-build-qhuh1q\\atari-py\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\xxxxxx\appdata\local\temp\pip-z8wnzs-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    Unable to execute 'make build -C atari_py/ale_interface -j 3'. HINT: are you sure `make` is installed?
    error: [Error 2] The system cannot find the file specified

当我输入 make 时在我的系统中:

C:\Users\xxxxxx>make
'make' is not recognized as an internal or external command,
operable program or batch file.

所以,显然缺少 make。但是我使用 conda 安装了 make:

C:\Users\xxxxxx>conda install mingw
Fetching package metadata .........
Solving package specifications: ..........

# All requested packages already installed.
# packages in environment at C:\Users\xxxxxx\AppData\Local\Continuum\Anaconda2:
#
mingw                     4.7

所以我已经安装了 mingw 4.7。

我怎样才能消除错误并获得包裹?

非常感谢您的帮助。

最佳答案

make 不在您的 PATH 中。 执行 echo %PATH% 并检查您的 msys 实用程序的路径是否在那里。否则,您可以按照此处的说明编辑此变量:Adding directory to PATH Environment Variable in Windows

关于python - 无法安装 Python 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39533880/

相关文章:

python-3.x - 如何在python=3.6中安装torch==0.3.1

python - EWS TimeZoneDefinitions : For a timezone, 如何计算当前时间的 UTC 偏移量

python - 查找一条线上距第一个点 X 轴特定距离的点

java - 如何处理java.lang.Exception : Socket bind failed: [730013] exception

c++ - Windows 上的 Qt QMYSQL "Driver not loaded"

windows - 何时使用 Wave 可扩展格式?

python - 使用 "requests"python 包的奇怪返回?怎么修?

Python requests.post 多部分/表单数据

python - 值(value)错误、真值错误、模糊错误

python - 使用 conda 获取大小写正确的 cx_Oracle