Windows 10 Anaconda提示pip安装失败 - 找不到/ bin / sh命令

时间:2017-09-19 05:21:35

标签: python windows-10 anaconda

尝试在anaconda shell提示符下在Windows 10上执行pip安装时出现以下错误。它抱怨“make:/ bin / sh:Command not found”。我已经在Anaconda中安装了make / cmake / zlib,所以我不知道如何解决这个问题。有人可以帮忙吗?感谢。

(C:\Users\freedo\Anaconda3) C:\Users\freedo>pip install gym[atari]
Requirement already satisfied: gym[atari] in c:\users\freedo\anaconda3\lib\site-packages
Requirement already satisfied: pyglet>=1.2.0 in c:\users\freedo\anaconda3\lib\site-packages (from gym[atari])
Requirement already satisfied: numpy>=1.10.4 in c:\users\freedo\anaconda3\lib\site-packages (from gym[atari])
Requirement already satisfied: requests>=2.0 in c:\users\freedo\anaconda3\lib\site-packages (from gym[atari])
Requirement already satisfied: six in c:\users\freedo\anaconda3\lib\site-packages (from gym[atari])
Requirement already satisfied: PyOpenGL; extra == "atari" in c:\users\freedo\anaconda3\lib\site-packages (from gym[atari])
Collecting atari-py>=0.1.1; extra == "atari" (from gym[atari])
  Using cached atari-py-0.1.1.tar.gz
Requirement already satisfied: Pillow; extra == "atari" in c:\users\freedo\anaconda3\lib\site-packages (from gym[atari])
Requirement already satisfied: olefile in c:\users\freedo\anaconda3\lib\site-packages (from Pillow; extra == "atari"->gym[atari])
Building wheels for collected packages: atari-py
  Running setup.py bdist_wheel for atari-py ... error
  Complete output from command C:\Users\freedo\Anaconda3\python.exe -u -c "impo
rt setuptools, tokenize;__file__='C:\\Users\\freedo\\AppData\\Local\\Temp\\pip-
build-81jehgwr\\atari-py\\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 C:\Users\freedo\AppData\Local\Temp\tmpg5htvm1qpip-wheel- --
python-tag cp36:
  running bdist_wheel
  running build
  make: Entering directory `/cygdrive/c/Users/freedo/AppData/Local/Temp/pip-build-81jehgwr/atari-py/atari_py/ale_interface'
  mkdir -p build && cd build && cmake .. && make -j4
  make: /bin/sh: Command not found
  Makefile:4: recipe for target `build' failed
  make: *** [build] Error 127
  make: Leaving directory `/cygdrive/c/Users/freedo/AppData/Local/Temp/pip-build-81jehgwr/atari-py/atari_py/ale_interface'
  Could not build atari-py: Command '['make', 'build', '-C', 'atari_py/ale_interface', '-j', '3']' returned non-zero exit status 2.. (HINT: are you sure cmake i
s installed? You might also be missing a library. Atari-py requires: zlib [installable as 'apt-get install zlib1g-dev' on Ubuntu].)
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\freedo\AppData\Local\Temp\pip-build-81jehgwr\atari-py\setup.py", line 36, in <module>
      tests_require=['nose2']
    File "C:\Users\freedo\Anaconda3\lib\distutils\core.py", line 148, in setup dist.run_commands()
    File "C:\Users\freedo\Anaconda3\lib\distutils\dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "C:\Users\freedo\Anaconda3\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "C:\Users\freedo\Anaconda3\lib\site-packages\wheel\bdist_wheel.py", line 179, in run
      self.run_command('build')
    File "C:\Users\freedo\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "C:\Users\freedo\Anaconda3\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "C:\Users\freedo\AppData\Local\Temp\pip-build-81jehgwr\atari-py\setup.py", line 16, in run
      subprocess.check_call(cmd)
    File "C:\Users\freedo\Anaconda3\lib\subprocess.py", line 291, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['make', 'build', '-C', 'atari_py/ale_interface', '-j', '3']' returned non-zero exit status 2.

1 个答案:

答案 0 :(得分:0)

根据{{​​3}},

atari-py不支持Windows,但有人制定了解决方法this Github issue(在Github问题中讨论过)。