win10下Python安装pycrypto报错
错误一: error: Microsoft Visual C++ 14.0 is required.
解决办法:
- 下载Visual C++2017安装包,下载链接:Visual C++ 2017 安装包下载
原文 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报错的更多相关文章
- 在MacOS下Python安装lxml报错xmlversion.h not found 报错的解决方案
最近在看一个自动化测试框架的问题,需要用到Lxml库,下载lxml总是报错. 1,使用pip安装lxml pip install lxml 2,然后报错了,报错内容是: In file include ...
- 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 ...
- Deepin下python安装uwsgi报错: Python.h:没有那个文件或目录
解决方法是安装python-dev,这是Python的头文件和静态库包 正在读取软件包列表... 完成正在分析软件包的依赖关系树 正在读取状态信息... 完成 下列软件包是自动 ...
- pip安装pycrypto报错:Microsoft Visual C++ 14.0 is required. 和 SSLError: HTTPSConnectionPool的解决办法
今天本打算把[Python3爬虫]网易云音乐爬虫 的代码敲一遍, 但是在安装pycrypto老是报错, 由于我计算是win10, 并且也有vs2017 python3环境下安装pycrypto的一些问 ...
- 【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 要安装 ...
- 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 ...
- python 安装模块报错 response.py", line 302, in _error_catcher
python 安装模块报错 Exception:Traceback (most recent call last): File "/usr/share/python-wheels/urlli ...
- Centos下yum安装Nginx报错 No package nginx available.
在Centos6下使用yum安装Nginx报错 解决方案: yum install epel-release
- python 安装 SQLAlchemy 报错
安装 SQLAlchemy 报错 安装命令 pip install -i https://pypi.doubanio.com/simple SQLAlchemy 报错截图 编码错误,这里我们需要改下源 ...
随机推荐
- Windows环境下大数据处理的构想(一)
为什么不呢?我们有了RPC/RMI和MAP,为什么不能在windows环境下处理大数据呢?windows是迄今为止最普及的操作系统,据市调公司NetMarketShare最新(2019年5月)统计数据 ...
- 【转】如何使用jupyter编写数学公式(译)
[1.如何使用jupyter编写数学公式(译)][1] [1]: https://www.jianshu.com/p/93ccc63e5a1b
- vs2017 官方下载地址 和 官方建立脱机安装包的方法
vs2017 官方下载地址: https://docs.microsoft.com/zh-cn/visualstudio/releasenotes/vs2017-relnotes VS2017 官方建 ...
- linux删除同目录及子目录下统一扩展名的文件
find . -name '*.csv' -type f -print -exec rm -rf {} \; 利用find去查找文件,点是指当前目录下,引号中是相应的数据的名称,自己可以定义,然后用t ...
- 学习python的日常
今天是开始正式接触python语言的第一天,然后来自前辈的知道开始了在学习过程当中用博客来记录自己的学习历程,以供自己更快地掌握这门编程语言. 大概的总结一下的话,还是按照我的编程的习惯,要学写代码, ...
- NFS启动文件系统
NFS启动文件系统 一.软硬件平台 1.开发板:创龙AM3359核心板,网口采用RMII形式. 2.UBOOT版本:U-Boot-2016.05,采用FDT和DM. 3.交换芯片MARVELL的88E ...
- kubernetes使用Traefik暴露web服务-转载51cto
Traefix介绍(摘自网络) traefik 是一个前端负载均衡器,对于微服务架构尤其是 kubernetes 等编排工具具有良好的支持:同 nginx 等相比,traefik 能够自动感知后端容器 ...
- JVM中对象是否已死
- python3 queue队列
一.queue队列 1.python3中的队列模块是queue,不是Queue 2.一般涉及到同步,多线程之类用到队列模块 3.定义了 queue.Queue 类,以及继承它的 queue.LifoQ ...
- python 私有和保护成员变量如何实现?—— "单下划线 " 开始的成员变量叫做保护变量,意思是只有类实例和子类实例能访问到这些变量;" 双下划线 " 开始的是私有成员,意思是只有类对象自己能访问,连子类对象也不能访问到这个数据
默认情况下,Python中的成员函数和成员变量都是公开的(public),在python中没有类似public,private等关键词来修饰成员函数和成员变量.在python中定义私有变量只需要在变量 ...