在Python中安装软件包时出现异常 [英] Exception while installing packages in Python

查看:1557
本文介绍了在Python中安装软件包时出现异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Python中安装软件包时,我正在获取此异常。
卸载python并重新安装,但是没有

  C:\Users\ramasastri.g\ Desktop \pycrypto-2.6> python setup.py安装
运行安装
运行build
运行build_py
运行build_ext
警告:未找到GMP或MPIR库;不建立Crypto.PublicKey._fastmath。

构建'Crypto.Random.OSRNG.winrandom'扩展名
C:\Program Files\Microsoft Visual Studio 10.0 \VC\BIN\cl.exe / c / nologo / Ox / MD / W3 / GS- / DNDEBUG -Isrc / -Isrc / inc-msvc / -IC:\Python27\include -IC:\Python27\PC /Tcsrc/winrand.c / Fobuild\temp .win32-2.7\Release\src / winrand.obj
winrand.c
c:\python27\include\pyconfig.h(68):致命错误C1083:无法打开包含文件: 'io.h':没有这样的文件或目录
错误:命令'C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe'失败,退出状态2


解决方案

可能你缺少c ++编译器。 >

我使用从 here


I am Getting this Exception while installing packages in Python. uninstalled python and installed it again but there is no

C:\Users\ramasastri.g\Desktop\pycrypto-2.6>python setup.py install
running install
running build
running build_py
running build_ext
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.

building 'Crypto.Random.OSRNG.winrandom' extension
C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Isrc/ -Isrc/inc-msvc/ -IC:\Python27\include -IC:\Python27\PC /Tcsrc/winrand.c /Fobuild\temp.win32-2.7\Release\src/winrand.obj
winrand.c
c:\python27\include\pyconfig.h(68) : fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe"' failed with exit status 2

解决方案

Probably you are missing the c++ compiler.

I installed it using a pre-packaged version from here

这篇关于在Python中安装软件包时出现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆