python - pyyaml安装失败

 高小原gy_941 发布于 2022-10-29 14:40

我在安装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

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

1 个回答
  • 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
    2022-10-30 17:12 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有