简体   繁体   English

我已经安装了 numpy,但不知何故没有在我的 jupyter 笔记本中导入

[英]I have installed numpy, yet it somehow does not get imported in my jupyter notebook

I have installed numpy using pip install numpy In the current directory.我已经安装了 numpy 使用 pip install numpy 在当前目录中。 But when I try to import it in my jupyter notebook, it gives an error.但是当我尝试在我的 jupyter notebook 中导入它时,它给出了一个错误。 ModuleNotFoundError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_17100/2172125874.py in ----> 1 import numpy ModuleNotFoundError Traceback (最近一次调用最后) ~\AppData\Local\Temp/ipykernel_17100/2172125874.py in ----> 1 import numpy

ModuleNotFoundError: No module named 'numpy' ModuleNotFoundError:没有名为“numpy”的模块

Please help me resolve this problem.请帮我解决这个问题。 I have tried uninstalling numpy and re-installing, yet it does not work at all.我已经尝试卸载 numpy 并重新安装,但它根本不起作用。 I am using a Windows 10 system.我正在使用 Windows 10 系统。

First, pip install numpy will install NumPy package in python/site-package, not the current directory.首先, pip install numpy将安装 NumPy ZEFE90A8E604A7C840E88D03AZ6F 的当前目录在python/site-package 中。 You can type pip show numpy in the terminal to check its information(path, version...).您可以在终端中键入pip show numpy以查看其信息(路径,版本...)。

Secondly, Maybe the interpreter you choose in Jupyter notebook is not the same as the one you installed numpy on.其次,可能你在 Jupyter notebook 中选择的解释器和你安装的 numpy 的解释器不一样。 You might need to check that.你可能需要检查一下。

To check Whether it has numpy.检查是否有 numpy。 You might use pip list to check that, in case pip corresponds to the interpreter you wanna check.您可以使用pip list来检查,以防pip对应于您要检查的解释器。

Hope this will help you.希望这会帮助你。

暂无
暂无

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

相关问题 jupyter notebook已经安装了pattern包为什么导入失败 - Why does the pattern package fails to be imported in jupyter notebook yet it is already installed 我已经在Windows中安装了TensorFlow,但是当我尝试将其导入Jupyter Notebook时出现错误 - I have installed TensorFlow in my Windows but I get an Error when I try to import it in my Jupyter Notebook 我不小心删除了我的 Jupyter Notebook - I have accidentally deleted my Jupyter Notebook 为什么 Jupyter 笔记本在我的代码中存在 Pycharm 没有的问题? - Why does Jupyter notebook have problems with my code that Pycharm does not? Jupyter Notebook 版本 5.7.5 已安装但出现错误 - Jupyter Notebook version 5.7.5 has been installed but I get error 我用pip和conda安装的模块无法在Sublime或Atom中导入,但可以使用Jupyter Notebook(有时甚至是Terminal)导入。 - Modules I've installed with pip and conda are not importable in Sublime or Atom, but can be imported using Jupyter Notebook (and sometimes Terminal) 安装 jupyter 时语法“jupiter notebook”无效+导入 - Invalid Syntax 'jupiter notebook' while jupyter is installed +imported Python:已安装Anaconda,但无法在Jupyter笔记本中导入numpy或matplotlib - Python: Installed Anaconda, but can't import numpy or matplotlib in Jupyter notebook 为什么我系统中安装的numpy没有matmul? - Why the installed numpy in my system does not have matmul? 未安装Anaconda / jupyter的笔记本 - notebook not installed with anaconda/jupyter
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM