....Cannot find suitable msvc 解决办法

Attempted to compile AOT function without the compiler used by `numpy.distutils` present. Cannot find suitable msvc. 解决办法

在运行一下python项目的时候,遇到了问题 Attempted to compile AOT function without the compiler used by numpy.distutils present. Cannot find suitable msvc. 然后找了网上一些解决方法,在这里记录一下

产生原因

我问了一个经常使用python的同学,他说是缺少一个C++的库,具体我也不太懂,应该是python某些库需要C++编译,知道了大佬可以评论区指出

解决办法

就是通过安装一个Visual Studio 2019 生成工具,来构造那些库。

1. 下载Visual Studio 2019 生成工具

到网址 https://visualstudio.microsoft.com/zh-hans/downloads/,下载Visual Studio 2019 生成工具

点击进入网址后下拉,找到所有下载下面的Visual Studio 2019 生成工具
在这里插入图片描述
点开它,找到如图所示的 Visual Studio 2019 生成工具,点击下载
在这里插入图片描述

下载完成,运行它,找到一个C++生成工具,然后安装
在这里插入图片描述

2. 下载完成后根据提示重启电脑

重启电脑完成后,即可运行python下面

猜你喜欢

转载自blog.csdn.net/weixin_43520670/article/details/115032844