【问题标题】:Jupyter Notebook - Erros with retrieving numpyJupyter Notebook - 检索 numpy 时出错
【发布时间】:2023-03-11 20:02:01
【问题描述】:

这是尝试将 pandas 导入为 pd 时返回的错误消息


ImportError                               Traceback (most recent call last)
<ipython-input-1-7dd3504c366f> in <module>
----> 1 import pandas as pd

/usr/lib/python3/dist-packages/pandas/__init__.py in <module>
     14 
     15 if missing_dependencies:
---> 16     raise ImportError(
     17         "Unable to import required dependencies:\n" + "\n".join(missing_dependencies)
     18     )

ImportError: Unable to import required dependencies:
numpy: 

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
  1. Check that you expected to use Python3.9 from "/usr/bin/python3.9",
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy version "1.17.4" you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

- If you're working with a numpy git repository, try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

Original error was: No module named 'numpy.core._multiarray_umath'

我正在运行 Ubuntu 20.04 Python3.9

我检查过 Python3.9 运行正常。 我已经卸载并安装了 numpy 和 anaconda 我已经尝试创建并运行一个虚拟环境来使用 jupyter in

我不知道还能做什么,或者我的问题出在哪里。对此的任何帮助将不胜感激。

【问题讨论】:

    标签: pandas numpy jupyter-notebook


    【解决方案1】:

    所以我解决了我的问题。

    在 Jupyter 笔记本中打开新笔记本时,会提示您打开 Python3 笔记本或 Python3.9.0 64 位笔记本。虽然 Python3.9.0 64 位是最新版本,而且我已经下载了一个,但它不是我安装的。打开 Python3 书籍时,我能够很好地导入熊猫(我没有收到关于无法打开 numpy 的错误消息)

    【讨论】:

      猜你喜欢
      • 2019-06-11
      • 1970-01-01
      • 2020-06-02
      • 2017-10-10
      • 2019-03-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-31
      相关资源
      最近更新 更多