【问题标题】:Module not found in jupyter在 jupyter 中找不到模块
【发布时间】:2021-06-24 13:17:15
【问题描述】:

我想安装 scikit-learn。我已成功安装它,但仍然显示找不到模块。然后我尝试卸载并重新安装它。但是在卸载时,我变得像这样。我已经尝试过this,但仍然遇到同样的错误

    File "C:\ProgramData\Anaconda3\lib\site.py", line 169, in addpackage
      exec(line)
    File "<string>", line 1, in <module>
    File "<frozen importlib._bootstrap>", line 553, in module_from_spec
  AttributeError: 'NoneType' object has no attribute 'loader'

Remainder of file ignored
 

【问题讨论】:

  • Error processing line 1 of C:\ProgramData\Anaconda3\lib\site-packages\matplotlib-3.4.0-py3.8-nspkg.pth: Traceback (most recent call last): File "C:\ProgramData\Anaconda3\lib\site.py", line 169, in addpackage exec(line) File "&lt;string&gt;", line 1, in &lt;module&gt; File "&lt;frozen importlib._bootstrap&gt;", line 553, in module_from_spec AttributeError: 'NoneType' object has no attribute 'loader' Remainder of file ignored 我在打开 jupyter notebook 时会这样

标签: python scikit-learn jupyter-notebook anaconda modulenotfounderror


【解决方案1】:

在您的 Jupyter 笔记本单元格中写入以下代码,它将不再显示错误。

!pip install sklearn --user

导入 sklearn

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-08-14
    • 1970-01-01
    • 1970-01-01
    • 2023-01-07
    • 2017-09-19
    • 1970-01-01
    • 2018-04-26
    相关资源
    最近更新 更多