suchen

Heim  >  Fragen und Antworten  >  Hauptteil

python - pyyaml安装失败

我在安装pyyaml的时候,报了以下错误:

  copying lib3\yaml\__init__.py -> build\lib.win32-3.5\yaml
  running build_ext
  creating build\temp.win32-3.5
  creating build\temp.win32-3.5\Release
  checking if libyaml is compilable
  error: [WinError 2] 系统找不到指定的文件。

  ----------------------------------------
  Failed building wheel for pyyaml
  Running setup.py clean for pyyaml
Failed to build pyyaml
Installing collected packages: pyyaml
  Running setup.py install for pyyaml ... error

我以为重要的是checking if libyaml is compilable,于是找到LibYaml库,想安装一个。下载下来以后,根据教程,使用了命令:

$ ./configure

成功获得makefile等各种文件。但是在使用mingw32-make的时候报错,错误如下:

$ mingw32-make
make  all-recursive
process_begin: CreateProcess(NULL, make all-recursive, ...) failed.
make (e=2): ϵͳ▒Ҳ▒▒▒ָ▒▒▒▒▒ļ▒▒▒
mingw32-make: *** [all] Error 2

请问,有什么方法可以解决吗?

PHPzPHPz2887 Tage vor924

Antworte allen(1)Ich werde antworten

  • PHP中文网

    PHP中文网2017-04-17 17:27:38

    pip install pyyaml
    

    http://my.oschina.net/ysj/blog/630421

    或者在这里下载对应的WHL文件,进行安装
    http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyyaml

    pip install *.whl
    
    

    后一个方法可以在python3.5中安装成功.

    
     o( ̄▽ ̄)o 2016-03-19 周六23:19:59.18 <( ̄︶ ̄)>
    D:\Dev\py3564\Scripts>pip install PyYAML-3.11-cp35-none-win_amd64.whl
    Processing d:\dev\py3564\scripts\pyyaml-3.11-cp35-none-win_amd64.whl
    Installing collected packages: PyYAML
    Successfully installed PyYAML-3.11

    Antwort
    0
  • StornierenAntwort