错误一:  error: Microsoft Visual C++ 14.0 is required.

解决办法:

原文 https://blog.csdn.net/heyshheyou/article/details/82022948

错误二: 语法错误: 标识符“intmax_t”

解决办法

32位

cd C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build      注  Community需要换成自己系统的值 比如我的是  Enterprise

vcvarsall.bat  x86_amd64

set CL=-FI"%VCToolsInstallDir%\include\stdint.h

pip install pycrypto

64位

cd C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build       注  Community需要换成自己系统的值 比如我的是  Enterprise

vcvarsall.bat x64

set CL=-FI"%VCToolsInstallDir%\include\stdint.h

pip install pycrypto

===============================================================================

附完整的错误提示:

1、python环境

>python -V

Python 3.7.0

2、pip install pycrypto报错如下

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

27): error C2061: 语法错误: 标识符“intmax_t”

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

28): error C2061: 语法错误: 标识符“rem”

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

28): error C2059: 语法错误:“;”

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

29): error C2059: 语法错误:“}”

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

31): error C2061: 语法错误: 标识符“imaxdiv_t”

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

31): error C2059: 语法错误:“;”

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

41): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

42): error C2146: 语法错误: 缺少“)”(在标识符“_Number”的前面)

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

42): error C2061: 语法错误: 标识符“_Number”

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

42): error C2059: 语法错误:“;”

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

43): error C2059: 语法错误:“)”

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

46): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

47): error C2146: 语法错误: 缺少“)”(在标识符“_Numerator”的前面)

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

47): error C2061: 语法错误: 标识符“_Numerator”

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

47): error C2059: 语法错误:“;”

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

47): error C2059: 语法错误:“,”

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

49): error C2059: 语法错误:“)”

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

51): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

57): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

64): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

70): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

77): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

83): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

90): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(

96): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)

error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Comm

unity\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x64\\cl.exe' failed with exit

status 2

—————————————-

Command "c:\python37\python.exe -u -c "import setuptools, tokenize;__file__='C:\

\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-bf6lznwz\\pycrypto\\setup.py

';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n'

);f.close();exec(compile(code, __file__, 'exec'))" install –record C:\Users\ADM

INI~1\AppData\Local\Temp\pip-record-xxn48yyz\install-record.txt –single-version

-externally-managed –compile" failed with error code 1 in C:\Users\ADMINI~1\App

Data\Local\Temp\pip-install-bf6lznwz\pycrypto\

==================================================================================

错误三、以上办法均使用,仍然不好使,去网上找对应版本的whl,手动安装   pip installer pycrypto-2.6.1-cp35-cp35m-win_amd64.whl

        如我的是python35 64位电脑 对应的 资源地址为:pycrypto-2.6.1-cp35-cp35m-win_amd64.whl    

              其它版本的whl 可以自行去网上搜索

参考链接:https://www.centosdoc.com/dev/python/312.html

        https://www.e-learn.cn/content/python/2360819

     https://www.cnblogs.com/Elaine1/p/10180260.html

https://blog.csdn.net/HW140701/article/details/93494869

win10下Python安装pycrypto报错的更多相关文章

  1. 在MacOS下Python安装lxml报错xmlversion.h not found 报错的解决方案

    最近在看一个自动化测试框架的问题,需要用到Lxml库,下载lxml总是报错. 1,使用pip安装lxml pip install lxml 2,然后报错了,报错内容是: In file include ...

  2. python安装pycrypto报错error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    系统3.19.0-15-generic #15-Ubuntu 安装pycrypto提示error: command 'x86_64-linux-gnu-gcc' failed with exit st ...

  3. Deepin下python安装uwsgi报错: Python.h:没有那个文件或目录

    解决方法是安装python-dev,这是Python的头文件和静态库包 正在读取软件包列表... 完成正在分析软件包的依赖关系树       正在读取状态信息... 完成       下列软件包是自动 ...

  4. pip安装pycrypto报错:Microsoft Visual C++ 14.0 is required. 和 SSLError: HTTPSConnectionPool的解决办法

    今天本打算把[Python3爬虫]网易云音乐爬虫 的代码敲一遍, 但是在安装pycrypto老是报错, 由于我计算是win10, 并且也有vs2017 python3环境下安装pycrypto的一些问 ...

  5. 【python】python安装tensorflow报错:python No matching distribution found for tensorflow==1.12.0

    python安装tensorflow报错:python No matching distribution found for tensorflow==1.12.0 python版本是3.7.2 要安装 ...

  6. mac下python环境pip报错[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) 的解决方法

    1.mac下python环境pip报错: issuserdeMacBook-Pro:~ issuser$ pip install pyinstallerCollecting pyinstaller  ...

  7. python 安装模块报错 response.py", line 302, in _error_catcher

    python 安装模块报错 Exception:Traceback (most recent call last): File "/usr/share/python-wheels/urlli ...

  8. Centos下yum安装Nginx报错 No package nginx available.

    在Centos6下使用yum安装Nginx报错 解决方案: yum install epel-release

  9. python 安装 SQLAlchemy 报错

    安装 SQLAlchemy 报错 安装命令 pip install -i https://pypi.doubanio.com/simple SQLAlchemy 报错截图 编码错误,这里我们需要改下源 ...

随机推荐

  1. ROMTableAddr = 0xE00FF003 错误 Target DLL has been cancelled 错误

    JTAG下载固件错误 keil下载固件错误 如下错误 * JLink Info: Found SWD-DP with ID 0x1BA01477 * JLink Info: Found SWD-DP ...

  2. SAP云平台上的SSO Principal Propagation设置

    我今天试图使用SAP云平台的SAP WebIDE Fullstack时,发现打不开, 遇到如下错误信息: You are not authorized to work with SAP Web IDE ...

  3. HBase集群环境搭建v1.0

    本文档环境基于ubuntu14.04版本,如果最终不使用SuperMap iServer 9D ,可以不配置geomesa-hbase_2.11-2.0.1-bin.tar.gz (转发请注明出处:h ...

  4. SQL SERVER-Alwayson原理

    流程 1.异步提交模式 主副本无须确认该副本已经完成日志固化,就可提交事务. 主副本不受辅助副本的影响 辅助副本上的DB处于SYNCHRONIZING 2.同步提交模式 主副本要确认副本已经完成日志固 ...

  5. 高效内存池的设计方案[c语言]

    一.前言概述 本人在转发的博文<内存池的设计和实现>中,详细阐述了系统默认内存分配函数malloc/free的缺点,以及进行内存池设计的原因,在此不再赘述.通过对Nginx内存池以及< ...

  6. 一些SQL保存

    因为两种Oracle数据库中对于结果行号的处理异同造成的. 在MSSQLServer中,可以使用top和ROW_NUMBER()方法的结合来实现,一般写法比较简单,而Oracle则有很大的不同. 只能 ...

  7. CentOS 7 修改时区例如上海时区

    Linux 系统(我特指发行版, 没说内核) 下大部分软件的风格就是不会仔细去考虑向后 的兼容性, 比如你上个版本能用这种程序配置, 没准到了下一个版本, 该程序已经不见了. 比如 sysvinit ...

  8. JS之try..catch...

    try 测试代码块的错误. catch 语句处理错误. throw 创建并跑出错误. try { //在这里运行代码 抛出错误 }catch(err){ //在这里处理错误 } 实例: <p&g ...

  9. LGOJP2831 愤怒的小鸟

    题目链接 题目链接 题解 数据范围显然状压/爆搜. 考虑\(f[S]\)表示二进制下已打了的猪的集合. 可以枚举\(S\)的子集\(S_1\),判定\(S\)中\(S_1\)的补集\(S_2\)是否合 ...

  10. [python]赶集网二手房爬虫插件【可用任意扩展】

    最近应一个老铁的要求,人家是搞房产的,所以就写了这个二手房的爬虫,因为初版,所以比较简单,有能力的老铁可用进行扩展. import requests import os   from bs4 impo ...