3

Microsoft Visual C++ Build Tools 安装

 3 years ago
source link: https://foofish.net/cpp_build_tools.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Microsoft Visual C++ Build Tools 安装

By 刘志军, 2021-03-05, 分类: python

工具

项目中用到wechatpy这个库,用pip安装完成后,启动报错 Exception: You must install either cryptography or pycryptodome! ,看错误应该是依赖的加密库 pycryptodome 没有安装。

于是单独安装pycryptodome,毫无意外的安装失败,不支持Windows,需要 C++编译环境 distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required.

微信截图_20210305154011.png

然后又跑到 https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python 这个站点看有没有直接可以用的whl包,这个站点暂时也没有提供该库的whl包。

最后只能老老实实根据文档要求安装C++ Build Tools来编译该库。

直接从百度网盘下载安装C++构建工具

https://pan.baidu.com/s/1-VTGzPA-RS6eIIqgiRO4yg

微信截图_20210305141507.png

安装耗时比较长,耐心等待会儿。

安装完成后,无需重启电脑,直接运行

pip install pycryptodomex --no-binary :all:

最后成功安装 pycryptodome

微信截图_20210305153635.png

以后遇到类似需要依赖C++ Build Tools安装的库,例如mysqlclient之类的都能直接安装了

有问题可以扫描二维码和我交流

关注公众号「Python之禅」,回复「1024」免费获取Python资源

python之禅

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK