简体   繁体   English

无法在 VScode 中导入 numpy/pandas/matplotlib 包

[英]Unable to import numpy/pandas/matplotlib packages in VScode

I have used widely used packages(installed via pip) for a while in Jupyter notebook without any issues.我在 Jupyter notebook 中使用广泛使用的包(通过 pip 安装)一段时间没有任何问题。 I tried to do Python coding in VScode,but it somehow cannot load those packages.我尝试在 VScode 中进行 Python 编码,但它无法以某种方式加载这些包。

I have tried changing python interpreter, but it did solve the issue.我试过更改 python 解释器,但确实解决了问题。 Does anyone know how to resolve this issue?有谁知道如何解决这个问题?

First make sure that you have the python interpreter installed on your computer.首先确保您的计算机上安装了 python 解释器。 In your vscode UI you should see a terminal.在您的 vscode 用户界面中,您应该会看到一个终端。 You can install and upgrade pip through there if needed by using these commands:如果需要,您可以使用以下命令安装和升级 pip:

pip install --upgrade pip

From here you should be able to import using pip commands.从这里您应该能够使用 pip 命令导入。

Hi you can use terminal for installation.您好,您可以使用终端进行安装。 otherwise you can anaconda iDE its very good tool and user friendly.否则你可以 anaconda iDE 它非常好的工具和用户友好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM