错误一:  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. java git .gitignore常用规则

    # Created by .ignore support plugin (hsz.mobi).gitignore # Operating System Files *.DS_Store Thumbs. ...

  2. JS去除字符串左右两端的空格(转载)

    来源:https://www.cnblogs.com/fanyf/p/3785387.html var str='     测试     '; 一.函数 <script type="t ...

  3. ISCC之msc1(签到题)

    V2VsbCBkb25lIQoKIEZsYWc6IElTQ0N7TjBfMG5lX2Nhbl9zdDBwX3kwdX0K Flag: ISCC{N0_0ne_can_st0p_y0u} 签到题 八进制 ...

  4. 使用BERT预训练模型+微调进行文本分类

    本文记录使用BERT预训练模型,修改最顶层softmax层,微调几个epoch,进行文本分类任务. BERT源码 首先BERT源码来自谷歌官方tensorflow版:https://github.co ...

  5. k8s安装之flannel.yaml

    收藏一下,以后直接从这里cp过来用的. flannel新版 --- apiVersion: extensions/v1beta1 kind: PodSecurityPolicy metadata: n ...

  6. Spring-05 -AOP [面向切面编程] -Schema-based 实现aop的步骤

    一.AOP [知识点详解] AOP:中文名称面向切面编程 英文名称:(Aspect Oriented Programming) 正常程序执行流程都是纵向执行流程 3.1 又叫面向切面编程,在原有纵向执 ...

  7. sql查询排序

        ORDER BY _column1, _column2; /* _column1升序,_column2升序 */   ORDER BY _column1, _column2 DESC; /* ...

  8. jpg/jpeg/png格式的区别与应用场景

    注:在存储图像时采用JPG还是PNG主要依据图像上的色彩层次和颜色数量进行选择 一..jpg/jpeg格式的图片(jpg全名:jpeg) JPG(或是JPEG): 优点: (1)占用内存小,网页加载速 ...

  9. tensorflow API _ 1 (control_flow_ops.cond)

    该函数用来控制程序执行流,相当于if-else了import tensorflow as tffrom tensorflow.python.ops import control_flow_ops a ...

  10. Python3学习(一)

    基本语法 python3不向下兼容,有些语法跟python2.x不一样,IDLE shell编辑器,快捷键:ALT+p,上一个历史输入内容,ALT+n 下一个历史输入内容.#idle中按F5可以运行代 ...