错误一:  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. ERROR: Cannot uninstall 'chardet'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

    pip 安装 docker库报错: ERROR: Cannot uninstall 'chardet'. It is a distutils installed project and thus we ...

  2. 删除Ubuntu的UEFI启动项

    bcdedit 删除 千万不要手贱用diskpart之类的命令直接删除文件夹,大写的没,有,用! 感谢这个视频的up主,youtube看不到请翻墙.https://www.youtube.com/wa ...

  3. MySQL Replication--开启GTID模式下匿名事务异常

    错误环境: OS: CentOS release 6.5 (Final) MySQL: MySQL 5.7.19 主从参数配置: master_info_repository = TABLE rela ...

  4. 在Activity/Fragment以外使用Toast【转】

    在 Activity 使用 Toast 这种是最基本的使用,Toast的第一个参数就是Context,一般在Activity中我们直接用this代替,代表调用者的实例为Activity. public ...

  5. obj + mtl 格式说明

    OBJ(或 .OBJ)是一种开放的几何定义文件格式,最初由Wavefront Technologies公司开发,用以描述其Advanced Visualizer动画包.该格式已被其他3D图形应用供应商 ...

  6. System V共享内存

    目录 1. 概述 2. System V共享内存API shmget shmat shmdt shmctl 3. 简单的程序 代码实现 common.h shmcreate.c shmrmid.c s ...

  7. Django admin 页面中文名称加s,去除s的设置

    class UserInfo(models.Model): #字段 #字段 #字段 class Meta: verbose_name_plural = '用户列表'

  8. 数据库事务和锁(三)——INNODB_LOCKS, INNODB_LOCK_WAITS, INNODB_TRX表的简单介绍

    INNODB_LOCKS, INNODB_LOCK_WAITS, INNODB_TRX是MYSQL中事务和锁相关的表.通常我们遇到事务超时或锁相关问题时,直接运行下面SQL语句即可进行简单检查: -- ...

  9. 使用Mybatis

    Pom.xml:项目对象模型,主要描述了项目---包括配置文件,开发者需要遵循的规则,缺陷管理系统,组织和licenses,项目的url,项目的依赖性以及其它与项目相关的因素.

  10. PHP——最新号码归属地数据库

    前言 最近在忙的一个项目,为了数据安全,不能够使用任何第三方的接口~ 号码库 | https://github.com/wangyang0210/Phone-Number-Range 代码 其实就是一 ...