【问题标题】:Issue importing modules when using a remote jupyter notebook使用远程 jupyter notebook 时出现导入模块问题
【发布时间】:2026-02-06 22:35:01
【问题描述】:

我正在通过我大学的服务器远程使用 Jupiter 笔记本。我使用了为您提供令牌的技术,然后您可以使用该令牌登录本地计算机。当我尝试运行我的代码时,我收到一条错误消息,提示

Out[] ModuleNotFoundError: No module named 'numpy' 

我感觉它与 python 环境路径有关。我欢迎任何帮助。

谢谢

import NumPy

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-d4cdadb62aa7> in <module>()
----> 1 import numpy

ModuleNotFoundError: No module named 'numpy'

【问题讨论】:

    标签: python jupyter-notebook jupyter remote-access pythonpath


    【解决方案1】:

    numpy 没有安装..

    您可以在 jupyter notebook 中使用以下命令安装 numpy

    !pip install numpy
    

    如果完全失败,请使用

    !pip3 install numpy
    

    ! mark 通知 jupyter 内核作为系统命令运行

    【讨论】: