当前位置: 首页 > news >正文

python Crypto 包安装

经测试使用 pip install pycrypto安装会出现,如下所示错误:

pip install pycrypto -i https://pypi.douban.com/simple/
Looking in indexes: https://pypi.douban.com/simple/
Collecting pycrypto
  Using cached https://pypi.doubanio.com/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz (446 kB)
  Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for pycrypto, since package 'wheel' is not installed.
Installing collected packages: pycrypto
    Running setup.py install for pycrypto ... error
    ERROR: Command errored out with exit status 1:
     command: 'd:\program files\python_3_6\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-sfprn7aa\\pycrypto_f79da88d14cb414aa0c543e5152117fc\\setup.py'"'"'; __file__='"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-sfprn7aa\\pycrypto_f79da88d14cb414aa0c543e5152117fc\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ADMINI~1\AppData\Local\Temp\pip-record-19gfpf0f\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\program files\python_3_6\Include\pycrypto'
         cwd: C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-sfprn7aa\pycrypto_f79da88d14cb414aa0c543e5152117fc\
    Complete output (183 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.6
    creating build\lib.win32-3.6\Crypto
    copying lib\Crypto\pct_warnings.py -> build\lib.win32-3.6\Crypto
    copying lib\Crypto\__init__.py -> build\lib.win32-3.6\Crypto
    creating build\lib.win32-3.6\Crypto\Hash
    copying lib\Crypto\Hash\hashalgo.py -> build\lib.win32-3.6\Crypto\Hash
    copying lib\Crypto\Hash\HMAC.py -> build\lib.win32-3.6\Crypto\Hash
    copying lib\Crypto\Hash\MD2.py -> build\lib.win32-3.6\Crypto\Hash
    ......
    winrand.c
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(31): error C2061: 语法错误: 标识符“intmax_t”
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(32): error C2061: 语法错误: 标识符“rem”
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(32): error C2059: 语法错误:“;”
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(33): error C2059: 语法错误:“}”
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(35): error C2061: 语法错误: 标识符“imaxdiv_t”
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(35): error C2059: 语法错误:“;”
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(45): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(46): error C2146: 语法错误: 缺少“)”(在标识符“_Number”的
前面)
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(46): error C2061: 语法错误: 标识符“_Number”
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(46): error C2059: 语法错误:“;”
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(47): error C2059: 语法错误:“)”
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(50): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(51): error C2146: 语法错误: 缺少“)”(在标识符“_Numerator
”的前面)
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(51): error C2061: 语法错误: 标识符“_Numerator”
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(51): error C2059: 语法错误:“;”
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(51): error C2059: 语法错误:“,”
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(53): error C2059: 语法错误:“)”
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(55): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(61): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(68): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(74): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(81): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(87): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(94): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(100): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
    error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\program files\python_3_6\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-sfprn7aa\\pycrypto_f79da88d14cb414aa0c543e5152117fc\\setup.py'"'"'; __file__='"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-sfprn7aa\\pycrypto_f79da88d14cb414aa0c543e5152117fc\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ADMINI~1\AppData\Local\Temp\pip-record-19gfpf0f\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\program files\python_3_6\Include\pycrypto' Check the logs for full command output.

后来到 https://www.pycrypto.org/ 发现可使用 pip install pycryptodome 安装 pycryptodome,程序中即可使用 Crypto 包。

http://www.lryc.cn/news/135902.html

相关文章:

  • 时序预测 | MATLAB实现SO-CNN-LSTM蛇群算法优化卷积长短期记忆神经网络时间序列预测
  • 前端开发,怎么解决浏览器兼容性问题? - 易智编译EaseEditing
  • 树莓派3B安装64位操作系统
  • Mysql系列 - 第2天:详解mysql数据类型(重点)
  • Linux常用的运维命令
  • 【从零学习python 】50.面向对象编程中的多态应用
  • 实现Token刷新机制
  • FlaUi输入账号密码
  • ModStartBlog v8.0.0 博客归档页面,部分组件升级
  • 使用 PyTorch 进行高效图像分割:第 4 部分
  • 西班牙卡瓦起泡酒的风味搭配
  • Java项目-苍穹外卖-Day05
  • 取模运算符在数组下标的应用
  • Firefox(火狐),使用技巧汇总,问题处理
  • 耐腐蚀高速数控针阀和多功能PID控制器在流量比率控制中的应用
  • C语言:选择+编程(每日一练Day6)
  • 微信小程序教学系列(8)
  • 情人节定制:HTML5 Canvas全屏七夕爱心表白特效
  • 操作系统-笔记-第五章-输入输出管理
  • 感觉自己效率不高吗?学习实现目标的六个关键步骤,让你做任何事都事半功倍!
  • 【高级IO】- 五种 IO 模型 | 多路转接 - select
  • 在Linux搭建GitLab私有仓库配置实现远程访问私有仓库Gitlab ——【内网穿透】
  • ChatGPT应用于高职教育的四大潜在风险
  • uni-app在组件中内嵌webView,实现自定义webView的大小,并处理页面中有webview时其他元素点击事件失效的问题
  • 档案开发:增加查询和打卡按钮
  • redis基础细心讲解,一篇了解常用的缓存技术!
  • Three.js之几何体、高光材质、渲染器设置、gui
  • UE4如何连接dmx---摇头矩阵灯具的创建
  • 网络聊天室
  • ChatGPT只是玩具:生成式人工智能在不同行业的应用