2017-06-15 58 views
1

有人可以帮助我吗?本指南dosent工作: PyCrypto on python 3.5pycrypto在Windows上的pycrypto失败的建筑轮

命令行:

创建构建\ temp.win32-3.6 \发布\ SRC C:\ Program Files文件(x86)的\微软的Visual Studio 14.0 \ VC \ BIN \ CL。 exe/c/nologo/Ox/W3/GL/DNDEBUG/MD -Isrc/-Isrc/inc-msvc/-IC:\ Python36-32 \ include -IC:\ Python36-32 \ include“-IC:\ Program Files (x86)\ Microsoft Visual Studio 14.0 \ VC \ INCLUDE“”-IC:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0.15063.0 \ ucrt“”-IC:\ Program Files(x86)\ Windows Kits \ NETFXSDK \ 4.6.1 \ include \ um“”-IC:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0.15063.0 \ shared“”-IC:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0.15063.0 \ um“”-IC:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0.15063.0 \ winrt“ /Tcsrc/winrand.c/Fobuild\temp.win32-3.6\Release\src/winrand.obj winrand.c C:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0.15063.0 \ ucrt \ inttypes .h(26):error C2061:syntax error:identifier'intmax_t'

C:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0.15063.0 \ ucrt \ inttypes.h(27):error C2061:语法错误:标识符'rem' C:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0.15063.0 \ ucrt \ inttypes.h(27):error C2059:syntax error:';'

C:\ Program Files文件(x86)的\的Windows套件\ 10 \包括\ 10.0.15063.0 \ ucrt \ inttypes.h(28):错误C2059:语法错误: '}'

C:\ PROGRAM文件(x86)\ Windows Kits \ 10 \ include \ 10.0.15063.0 \ ucrt \ inttypes.h(30):error C2061:syntax error:identifier'imaxdiv_t'

error:command'C:\ Program Files(x86 )\微软的Visual Studio 14.0 \ VC \ BIN \ cl.exe时”失败,退出状态2


未能建筑轮pycrypto

运行setup.py干净的pycrypto 未能建立pycrypto

安装收集包:pycrypto 运行的setup.py安装pycrypto ...错误

警告:GMP或MPIR库未找到;不构建Crypto.PublicKey._fastmath。

---------------------------------------- 

命令“C:\ Python36-32 \ python.exe -u -c”import setuptools,tokenize; 文件 = 'C:\用户\ CHRIST〜1 \应用程序数据\本地\ TEMP \ PIP-集结1hsm_c69 \ pycrypto \ setup.py'; F = GETATTR(标记化, '开放式',打开)(文件) ; code = f.read()。replace('\ r \ n','\ n'); f.close(); exec(编译(代码,文件,'exec'))“install --record C:\ Users \ CHRIST〜1 \ AppData \ Local \ Temp \ pip-wl7h4k32-record \ install-record.txt --single-version-external-managed -compile“失败,错误代码1在C:\ Users \ CHRIST〜1 \ AppData \ Local \ Temp \ pip-build-1hsm_c69 \ pycrypto \

有没有办法安装PyCrypto? Visual Studio 2015已安装;我应该为visual studio设置环境变量吗?

回答

2

你的python版本是3.6,这就是为什么你可以运行这个错误。你需要改变python3.5,正确的是3.5.2。我认为你可以成功导入。