错误一:  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. 详解html中的marquee属性

    转自:https://www.jb51.net/web/531309.html 该标签不是HTML3.2的一部分,并且只支持MSIE3以后内核,所以如果你使用非IE内核浏览器(如:Netscape)可 ...

  2. SIM7600CE http post

    SIM7600CE是一款SMT封装的模块,支持 LTE-TDD/LTE-FDD/HSPA+/TD-SCDMA/EVDO和GSM/GPRS/EDGE等频段,支持LTE CAT4(下行速度为150Mbps ...

  3. iOS 关键词assign、strong、copy、weak、unsafe_unretained

    关键词assign.strong.copy.weak.unsafe_unretained 影响: 是否开辟新的内存 是否有引用计数增加 strong 指向并拥有该对象.其修饰的对象引用计数会 +1,该 ...

  4. 码云和Git使用说明

    Git下载网站: https://git-scm.com/download/win 码云网站     :https://gitee.com 下载Git,并一路下一步安装. 鼠标空白处右键点击,出现两个 ...

  5. Windows通过SSH远程登录Linux主机

    准备工作:1.Windows系统下装有VMware虚拟机且是Linux系统2.终端连接工具Xshell 63.本次实验系统IP如下 系统 IP Windows10 192.168.37.111 Cen ...

  6. 使用Cloudera Manager搭建HDFS完全分布式集群

    使用Cloudera Manager搭建HDFS完全分布式集群 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 关于Cloudera Manager的搭建我这里就不再赘述了,可以参考 ...

  7. android在主线程下载文件

    android在主线程下载文件 加入以下代码即可if (android.os.Build.VERSION.SDK_INT > 9) { StrictMode.ThreadPolicy polic ...

  8. Spring中Model,ModelMap和ModelAndView

    目录 1.Model接口 2.ModelMap 3.ModelAndView 1.Model接口(org.springframework.ui.Model) Model是一个接口,包含addAttri ...

  9. HDU - 6125: Free from square (状压DP+分组背包)

    problem:给定N,K.表示你有数1到N,让你最多选择K个数,问有多少种方案,使得选择的数的乘积无平方因子数.N,K<500: solution:显然可以状压DP做,但是500以内的素数还是 ...

  10. nginx配置白名单

    配置如下: http模块: http { include mime.types; default_type application/octet-stream; #log_format main '$r ...