亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

無法在 Jupyter 筆記本中導入 Numpy

無法在 Jupyter 筆記本中導入 Numpy

炎炎設計 2023-10-11 16:01:10
目前為止我所遵循的步驟基本上是:安裝pipenv,在所需目錄中創建新環境pipenv install jupyterlabpipenv install pandas但是,當打開我的第一個筆記本并運行 時import pandas,我收到一個錯誤,該錯誤似乎來自作為numpy的依賴項導入pandas。import pandas---------------------------------------------------------------------------RuntimeError? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Traceback (most recent call last)<ipython-input-1-38d4b0363d82> in <module>----> 1 import pandas~/.local/share/virtualenvs/test-notebook-again-duPr9W-R/lib/python3.9/site-packages/pandas/__init__.py in <module>? ? ? 9 for dependency in hard_dependencies:? ? ?10? ? ?try:---> 11? ? ? ? ?__import__(dependency)? ? ?12? ? ?except ImportError as e:? ? ?13? ? ? ? ?missing_dependencies.append(f"{dependency}: {e}")~/.local/share/virtualenvs/test-notebook-again-duPr9W-R/lib/python3.9/site-packages/numpy/__init__.py in <module>? ? 284? ? ? ? ? ? ? ? ? ? ?"that provided NumPy.\n{}\n".format(? ? 285? ? ? ? ? ? ? ? ? ? ? ? ?error_message))--> 286? ? ? ? ? ? ? ? ?raise RuntimeError(msg)? ? 287? ? ?del _mac_os_check? ? 288?RuntimeError: Polyfit sanity test emitted a warning, most likely due to using a buggy Accelerate backend. If you compiled yourself, see site.cfg.example for information. Otherwise report this to the vendor that provided NumPy.RankWarning: Polyfit may be poorly conditioned我相信,在安裝 pandas 時,Numpy 默認安裝在環境中,但這個安裝似乎出了問題?我不知道&ldquo;Accelerate&rdquo;或&ldquo;Polyfit&rdquo;是什么,說實話,嘗試閱讀它們的內容感覺就像我無法理解。這里一定有一個比作為一個完全初學者嘗試理解這些事情更簡單的解決方案,對吧?有人知道為什么會發生這種情況嗎?
查看完整描述

3 回答

?
蕪湖不蕪

TA貢獻1796條經驗 獲得超7個贊

在我的 Mac 上運行得非常順利。

https://gist.github.com/yatsu/47bdde35e8abbe7d14bbe730342aa9e0

Numpy 1.19.2 與 Python 3.9.0


查看完整回答
反對 回復 2023-10-11
?
溫溫醬

TA貢獻1752條經驗 獲得超4個贊

也遇到了同樣的錯誤,嘗試使用pipenv install matplotlib。使用Python 3.9。



查看完整回答
反對 回復 2023-10-11
?
慕工程0101907

TA貢獻1887條經驗 獲得超5個贊

將 Python 回滾到較早的版本,即 2020 年 7 月 20 日的 Python 3.8.5,并且我能夠使用然后最后安裝pip3 install pandaspip3 install notebookJupyterimport pandas, numpy中。



查看完整回答
反對 回復 2023-10-11
  • 3 回答
  • 0 關注
  • 272 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號