python 3.6安装numpy报错 error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++

在尝试使用pip安装numpy时遇到错误,提示Microsoft Visual C++ 14.0 is required。为解决此问题,可以到第三方库下载对应版本的numpy包,切换到本地库文件夹,然后使用pip安装指定版本的numpy whl文件。

python 3.6 采用 :

pip install numpy

安装失败并且报错:

No module named ‘numpy.distutils._msvccompiler’ in numpy.distutils; trying from distutils customize MSVCCompiler
libraries satlas not found in [‘d:\myproject\venv\lib’, ‘C:\’]
NOT AVAILABLE

atlas_blas_threads_info: Setting PTATLAS=ATLAS No module named ‘numpy.distutils._msvccompiler’ in numpy.distutils; trying from
distutils customize MSVCCompiler
libraries ptf77blas,ptcblas,atlas not found in [‘d:\myproject\venv\lib’, ‘C:\’]
NOT AVAILABLE

atlas_blas_info: No module named ‘numpy.distutils._msvccompiler’ in numpy.distutils; trying from distutils customize MSVCCompiler
libraries f77blas,cblas,atlas not found in [‘d:\myproject\venv\lib’, ‘C:\’]
NOT AVAILABLE

C:\Users\dcp\AppData\Local\Temp\pip-build-_69grxl2\numpy\numpy\distutils\system_info.py:624:
UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
self.calc_info() blas_info: No module named ‘numpy.distutils._msvccompiler’ in numpy.distutils; trying from
distutils customize MSVCCompiler
libraries blas not found in [‘d:\myproject\venv\lib’, ‘C:\’]
NOT AVAILABLE

C:\Users\dcp\AppData\Local\Temp\pip-build-_69grxl2\numpy\numpy\distutils\system_info.py:624:
UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
self.calc_info() blas_src_info:
NOT AVAILABLE

C:\Users\dcp\AppData\Local\Temp\pip-build-_69grxl2\numpy\numpy\distutils\system_info.py:624:
UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
self.calc_info()
NOT AVAILABLE

non-existing path in ‘numpy\distutils’: ‘site.cfg’ F2PY Version 2
lapack_opt_info: lapack_mkl_info: No module named
‘numpy.distutils._msvccompiler’ in numpy.distutils; trying from
distutils customize MSVCCompiler
libraries mkl_rt not found in [‘d:\myproject\venv\lib’, ‘C:\’]
NOT AVAILABLE

openblas_lapack_info: No module named
‘numpy.distutils._msvccompiler’ in numpy.distutils; trying from
distutils customize MSVCCompiler No module named
‘numpy.distutils._msvccompiler’ in numpy.distutils; trying from
distutils customize MSVCCompiler
libraries openblas not found in [‘d:\myproject\venv\lib’, ‘C:\’]
NOT AVAILABLE

openblas_clapack_info: No module named
‘numpy.distutils._msvccompiler’ in numpy.distutils; trying from
distutils customize MSVCCompiler No module named
‘numpy.distutils._msvccompiler’ in numpy.distutils; trying from
distutils customize MSVCCompiler
libraries openblas,lapack not found in [‘d:\myproject\venv\lib’, ‘C:\’]
NOT AVAILABLE

atlas_3_10_threads_info: Setting PTATLAS=ATLAS No module named
‘numpy.distutils._msvccompiler’ in numpy.distutils; trying from
distutils customize MSVCCompiler
libraries tatlas,tatlas not found in d:\myproject\venv\lib No module named ‘numpy.distutils._msvccompiler’ in numpy.distutils;
trying from distutils customize MSVCCompiler
libraries lapack_atlas not found in d:\myproject\venv\lib No module named ‘numpy.distutils._msvccompiler’ in numpy.distutils;
trying from distutils customize MSVCCompiler
libraries tatlas,tatlas not found in C:\ No module named ‘numpy.distutils._msvccompiler’ in numpy.distutils; trying from
distutils customize MSVCCompiler
libraries lapack_atlas not found in C:\

解决办法

第三方库官网下载对应版本numpy包图

通过cd 切换到本地库安装文件夹

这里写图片描述

然后通过

pip install numpy-1.14.0+mkl-cp37-cp37m-win_amd64.whl

安装模块即可解决报错问题

### 回答1: 非零退出代码(1):错误:需要 Microsoft Visual C 14.0。获取它。 这个错误通常意味着您需要安装或升级 Microsoft Visual C++ Redistributable for Visual Studio 2015、2017 或 2019。您可以前往 Microsoft 官方网站下载并安装它。如果已经安装了但仍然出现此错误,请确保您的环境变量 PATH 中包含了 Microsoft Visual C++安装路径。您还可以尝试更新您的 pip 包管理器,使用以下命令:python -m pip install --upgrade pip。 如果您仍然无法解决这个问题,您可以考虑卸载并重新安装您正在使用的软件。如果您使用的是 Anaconda,则可以尝试重新安装或升级它。如果您使用的是 Python 的其他发行版,则可以尝试使用 Anaconda 作为您的 Python 环境。 总的来说,要解决这个错误,您需要确保您的系统中已经安装了所有必需的库和软件,并且环境变量设置正确。如果您还遇到问题,请查看相关的日志和错误消息,并尝试在社区中寻求帮助。 ### 回答2: 这个错误的意思是需要安装 Microsoft Visual C++ 14.0 才能正常运行程序。Microsoft Visual C++Microsoft 推出的一款编程语言,常用于 Windows 操作系统上的软件开发。大多数情况下,这个错误通常出现在 Windows 系统上,是因为我们没有安装或更新到最新的 Microsoft Visual C++ 14.0 编译工具。 要解决这个错误,我们可以尝试以下几种方法: 1. 安装 Visual C++ Build Tools:可以从官方网站下载 Visual C++ Build Tools,并进行安装,这样会自动安装所有必要的组件,帮助我们解决这个错误。 2. 更新 Visual Studio:如果已经安装Visual Studio,可以检查更新是否可用。如果有可用的更新,可以安装更新到最新版本,从而获得 Microsoft Visual C++ 14.0 编译工具。 3. 检查是否安装了正确的版本:如果已经安装Visual C++,可以检查当前安装的版本是否正确。有时候,我们可能会安装了多个不同版本的 Visual C++,而我们需要的是 14.0 版本。 总之,要解决这个错误,我们需要安装或更新到最新的 Microsoft Visual C++ 14.0 编译工具。这里提到的方法只是一些常见的解决方法,如果还存在其他问题,可以继续查阅相关的文档或寻求更高级的技术支持。 ### 回答3: 这个错误提示意味着需要安装Microsoft Visual C++14.0组件,否则无法正常编译或运行程序。Visual C++Microsoft用于开发C++程序的集成开发环境(IDE)之一,在安装Pythonnumpy等一些软件包时也可能需要用到。 要解决这个问题,可以按照以下步骤操作: 1.访问Microsoft Visual C++ 14.0官网,在下载页面选择最新版的Visual C++ Redistributable for Visual Studio 2015。 2.下载后,运行安装包并按照提示进行安装。这个过程可能需要一些时间,请耐心等待。 3.安装完成后,重新运行程序或执行相应的操作,应该就不会再出现non-zero exit code (1)等错误信息了。 除了安装Visual C++,还可以考虑升级或重装Python等相关软件包,以保证它们的依赖库是最新的。如果问题还是存在,可以参考网上的更多解决方案或咨询相关技术人员。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值