【发布时间】: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