xxx\pycrypto-2.6.1>python34 setup.py build
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
Traceback (most recent call last):
File "setup.py", line 456, in <module>
core.setup(**kw)
File "C:\Python34\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\distutils\command\build.py", line 126, in run
self.run_command(cmd_name)
File "C:\Python34\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 253, in run
build_ext.run(self)
File "C:\Python34\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "setup.py", line 150, in build_extensions
build_ext.build_extensions(self)
File "C:\Python34\lib\distutils\command\build_ext.py", line 448, in build_extensions
self.build_extension(ext)
File "C:\Python34\lib\distutils\command\build_ext.py", line 503, in build_extension
depends=ext.depends)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 460, in compile
self.initialize()
File "C:\Python34\lib\distutils\msvc9compiler.py", line 371, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 287, in query_vcvarsall
raise ValueError(str(list(result.keys())))
ValueError: ['path']
1
FrankFang128 2015-10-04 12:14:01 +08:00 via Android
装个 Ubuntu
|
2
zhuangzhuang1988 2015-10-04 12:32:06 +08:00
vs 有个专门的针对 python 的编译器
|
3
geeklian 2015-10-04 12:38:11 +08:00
1 楼简直呵呵了...v2er 现在就这水准了?
方法 1 :按个 Visual Studio 2010 ,以后就继续 pip 。 方法 2 :使用 anaconda3.4 代替原版的 python3.4 , anaconda 是一个 cpython 的打包发行版,优点 NumPy\pycrypto 这种很难装的 pkg 都非常简单的安装。 方法 3 :打开 http://www.voidspace.org.uk/python/pycrypto-2.6.1/,下载 pycrypto-2.6.1.win-amd64-py3.4.msi 。就单个包来说...收藏 2 个网址 http://www.lfd.uci.edu/~gohlke/pythonlibs/ http://www.voidspace.org.uk/python/modules.shtml |
4
RAKE 2015-10-04 13:02:06 +08:00
没记错那个 VS For Python 下载链接是 http://aka.ms/vspython
的确有种 Python 在 Linux 下的支持更好的错觉了。蛮多 Python 开发的个人小应用到 Windows 就水土不服。尤其是中文支持! |
5
geeklian 2015-10-04 13:51:00 +08:00
@RAKE
Python version VC++ version 2.5.6 7.1 2.6.9 9.0 2.7.6 9.0 3.2.3 9.0 3.3.5 10.0 3.4.0 10.0 9.0 = 2008 10.0 = 2010 3.5.0 要用 Visual Studio Community 2015 编译... python 的情况比微软想的还复杂... 233... 微软给的 Microsoft Visual C++ Compiler for Python 2.7 ,这货其实是 vc2008 的编译环境,最好不要用在 python3.4 上 但扯到各种第三方库的代码在不同版本的 vc 下不一定都能编译过去... 所以最好的办法,还是下载现成的编译打包版本 |
8
asahi 2015-10-04 14:49:02 +08:00
这个问题我也遇到过,后来直接安了二进制包。 stackoverflow 上有一个回答能完整解决问题,需要安装 vs2010 还有一些补丁包,有些麻烦,但安装好就一劳永逸了。
|
9
RAKE 2015-10-04 22:54:59 +08:00
|
11
QQ1685425675 2015-10-05 08:58:01 +08:00
有时候 安装一个 mingw32 也行的 加入系统变量
|