Записная книжка Jupyter — ошибки при извлечении numpy

#pandas #numpy #jupyter-notebook

#pandas #numpy #jupyter-записная книжка

Вопрос:

Вот сообщение об ошибке, которое возвращается при попытке импортировать 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 в

Я не знаю, что еще делать, или в чем моя проблема. Любая помощь в этом была бы весьма признательна.

Ответ №1:

Итак, я решил свою проблему.

При открытии новой записной книжки в записной книжке Jupyter предлагается открыть записную книжку Python3 или 64-разрядную записную книжку Python3.9.0. Хотя 64-разрядная версия Python3.9.0 является самой последней версией, которую я скачал, это было не то, что я установил. При открытии книги Python3 я смог импортировать pandas просто отлично (я не получил сообщения об ошибке о невозможности открыть numpy)