在尝试通过 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/