vscode + anaconda环境 出现ImportError

简介: vscode + anaconda环境 出现ImportError

vscode anaconda 环境 出现importError 解决方法


Importing the numpy C-extensions failed.


问题描述

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Anaconda3\lib\site-packages\numpy\__init__.py", line 142, in <module>
    from . import core
  File "D:\Anaconda3\lib\site-packages\numpy\core\__init__.py", line 50, in <module>
    raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
    https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
  * The Python version is: Python3.8 from "D:\Anaconda3\python.exe"
  * The NumPy version is: "1.18.5"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: DLL load failed while importing _multiarray_umath: 找不到指定的模块。

看到了很多解决方法,有一些是无效的,有的要修改vscode settings.json文件的"terminal.integrated.shell.windows": “C:\WINDOWS\System32\cmd.exe”,


最后找到了一种感觉最好的方案:

pip install --upgrade numpy
目录
相关文章
|
12月前
|
API C++
【Azure 环境】VS Code登录China Azure(Function)报错 An error occurred while signing in: invalid_request - AADSTS65002
An error occurred while signing in: invalid_request - AADSTS65002: Consent between first party application 'c27c220f-ce2f-4904-927d-333864217eeb' and first party resource '797f4846-ba00-4fd7-ba43-dac1f8f63013' must be configured via preauthorization - applications owned and operated by Microsoft mus
528 13
|
Ubuntu Linux Shell
Linux环境下VSCode快速安装终极指南:debian/ubuntu/linux平台通用
以上就是在Linux环境下安装VSCode的终极指南,抛开繁复的专业词汇,以平易近人的文字、形象生动的比喻让你轻松学会这一过程。别忘了,你的小伙伴VSCode已经在应用菜单里等你了!
3469 23
|
Python
在VScode环境下配置Python环境的方法
经过上述步骤,你的VSCode环境就已经配置好了。请尽情享受这扇你为自己开启的知识之窗。如同你在冒险世界中前行,你的探索之路只有越走越广,你获得的知识只会越来越丰富,你的能力只会越来越强。
1318 37
|
Python
新手向 Python:VsCode环境下Manim配置
该文介绍了如何准备和配置开发环境以使用Manim,主要包括两个步骤:一是准备工作,需要下载并安装VsCode和Anaconda,其中Anaconda需添加到系统PATH环境变量,并通过清华镜像源配置;二是配置环境,VsCode中安装中文插件和Python扩展,激活并配置虚拟环境。最后,安装ffmpeg和manim,通过VsCode运行测试代码验证配置成功。
2245 1
|
JavaScript 前端开发 编译器
TypeScript教程(一)在vscode中的配置TypeScript环境
本文是一篇TypeScript入门教程,介绍了在VS Code中配置TypeScript环境的步骤,包括安装Node.js、使用npm安装TypeScript、配置npm镜像源、安装VS Code的TypeScript扩展,以及创建和运行一个简单的TypeScript "Hello World"程序。
TypeScript教程(一)在vscode中的配置TypeScript环境
|
Ubuntu Linux 编译器
Linux/Ubuntu下使用VS Code配置C/C++项目环境调用OpenCV
通过以上步骤,您已经成功在Ubuntu系统下的VS Code中配置了C/C++项目环境,并能够调用OpenCV库进行开发。请确保每一步都按照您的系统实际情况进行适当调整。
3324 3
|
网络安全 开发者 Python
VSCode远程切换Python虚拟环境
VSCode远程切换Python虚拟环境
1670 1
|
C++ Python
VS Code 搭建 Python 环境 Conda管理
VS Code 搭建 Python 环境 Conda管理
381 2
|
Linux 开发工具 Python
【Deepin 20系统】Linux系统从零打造完美VScode for Python环境
如何在Deepin 20系统中从零开始配置一个完美的VScode for Python开发环境,包括安装Anaconda、VScode、必要的插件、汉化、主题和字体设置,以及如何运行和调试Python程序。
862 6
【Azure 环境】连接到微软云Azure中国区 By VS 2019, VS Code, Powershell
【Azure 环境】连接到微软云Azure中国区 By VS 2019, VS Code, Powershell
629 0
【Azure 环境】连接到微软云Azure中国区 By VS 2019, VS Code, Powershell