使用MS Visual C++;Python2.7编译器包
我正试图通过使用MS Visual C++;Python2.7编译器包,python,windows,gmpy,Python,Windows,Gmpy,我正试图通过pip install gmpy在使用virtualenv创建的测试环境中安装gmpy,但它正在回退一个错误 我的笔记本电脑是windows 8.1 x64,使用Python 27 x32 < P>我安装了Python 2.7的微软Visual C++编译器包,因为我得到的无法找到VCVALSALAL.BAT< /Cord>错误消息。一旦我安装了Python 2.7的C++编译器包,并升级 StuuToots到7 < /C>工具,消息就消失了,但我得到以下: c:\envs\test
pip install gmpy
在使用virtualenv创建的测试环境中安装gmpy,但它正在回退一个错误
我的笔记本电脑是windows 8.1 x64,使用Python 27 x32
< P>我安装了Python 2.7的微软Visual C++编译器包,因为我得到的<代码>无法找到VCVALSALAL.BAT< /Cord>错误消息。一旦我安装了Python 2.7的C++编译器包,并升级<代码> StuuToots到7 < /C>工具,消息就消失了,但我得到以下:
c:\envs\testenv1\build\gmpy\src\gmpy.h(30) : fatal error C1083: Cannot open include file: 'gmp.h': No such file or directory
error: command 'C:\\Users\\user_name\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2
----------------------------------------
Cleaning up...
Removing temporary dir C:\envs\testenv1\build...
Command C:\envs\testenv1\Scripts\python.exe -c "import setuptools, tokenize;__file__='C:\\envs\\testenv1\\build\\gmpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\user_name\appdata\local\temp\pip-t4r7jf-record\install-record.txt --single-version-externally-managed --compile --install-headers C:\envs\testenv1\include\site\python2.7 failed with error code 1 in C:\envs\testenv1\build\gmpy
Exception information:
Traceback (most recent call last):
File "C:\envs\testenv1\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\envs\testenv1\lib\site-packages\pip\commands\install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "C:\envs\testenv1\lib\site-packages\pip\req.py", line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "C:\envs\testenv1\lib\site-packages\pip\req.py", line 706, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "C:\envs\testenv1\lib\site-packages\pip\util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command C:\envs\testenv1\Scripts\python.exe -c "import setuptools, tokenize;__file__='C:\\envs\\testenv1\\build\\gmpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\user_name\appdata\local\temp\pip-t4r7jf-record\install-record.txt --single-version-externally-managed --compile --install-headers C:\envs\testenv1\include\site\python2.7 failed with error code 1 in C:\envs\testenv1\build\gmpy
有人能给我指出正确的方向吗
我已安装以下设备:
Microsoft Visual 2008 Redistributable - x64 9.0.30729.6161
Microsoft Visual 2008 Redistributable - x86 9.0.30729.6161
Microsoft Visual 2010 x64 Redistributable - 10.0.40219
Microsoft Visual 2010 x86 Redistributable - 10.0.40219
Microsoft Visual 2012 Redistributable (x64) - 11.0.61030
Microsoft Visual 2012 Redistributable (x86) - 11.0.61030
Microsoft Visual C++ Compiler Package for Python 2.7
我不想安装VS2008或MINGW。我希望“Python 2.7的微软Visual C++编译器包”会纠正这个问题,但它没有。p> 我维护
gmpy
,我要说的是,在Windows上构建gmpy
和gmpy2
非常具有挑战性。有什么原因不能使用预构建的二进制文件吗gmpy
/gmpy2
依赖于单个DLL,因此如果需要,可以非常轻松地复制到其他位置。我建议您在系统上安装anaconda发行版。使用conda安装gmpy2非常简单。它为您处理所有依赖关系。您只需键入命令:conda install gmpy2在您的环境中,几秒钟后即可安装。我最初想安装pycrypto。但我收到警告:未找到GMP或MPIR库;不要在C++编译器错误旁边建立密码。我想安装PySTFP,它需要paramiko,它需要pycrypto,它需要gmp库。我觉得我走错了方向。我只想使用ssl建立ftp连接。我是python新手。PyCrypto
实际上并不需要gmpy
。它需要GMP或MPIRC
库gmpy
也需要相同的库。编写GMP或MPIR是一项挑战。我想找一个预先构建的Windows二进制文件PyCrypto。你知道我是否需要paramiko
的PyCrypto
?我知道根据文件,PYSTFP的要求包括paramiko。。