炎炎設(shè)計(jì)
2023-10-11 16:01:10
目前為止我所遵循的步驟基本上是:安裝pipenv,在所需目錄中創(chuàng)建新環(huán)境pipenv install jupyterlabpipenv install pandas但是,當(dāng)打開我的第一個(gè)筆記本并運(yùn)行 時(shí)import pandas,我收到一個(gè)錯(cuò)誤,該錯(cuò)誤似乎來自作為numpy的依賴項(xiàng)導(dǎo)入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 時(shí),Numpy 默認(rèn)安裝在環(huán)境中,但這個(gè)安裝似乎出了問題?我不知道“Accelerate”或“Polyfit”是什么,說實(shí)話,嘗試閱讀它們的內(nèi)容感覺就像我無法理解。這里一定有一個(gè)比作為一個(gè)完全初學(xué)者嘗試?yán)斫膺@些事情更簡單的解決方案,對吧?有人知道為什么會(huì)發(fā)生這種情況嗎?
3 回答

蕪湖不蕪
TA貢獻(xiàn)1796條經(jīng)驗(yàn) 獲得超7個(gè)贊
在我的 Mac 上運(yùn)行得非常順利。
https://gist.github.com/yatsu/47bdde35e8abbe7d14bbe730342aa9e0
Numpy 1.19.2 與 Python 3.9.0

溫溫醬
TA貢獻(xiàn)1752條經(jīng)驗(yàn) 獲得超4個(gè)贊
也遇到了同樣的錯(cuò)誤,嘗試使用pipenv install matplotlib。使用Python 3.9。

慕工程0101907
TA貢獻(xiàn)1887條經(jīng)驗(yàn) 獲得超5個(gè)贊
將 Python 回滾到較早的版本,即 2020 年 7 月 20 日的 Python 3.8.5,并且我能夠使用然后最后安裝pip3 install pandas
到pip3 install notebook
Jupyterimport pandas, numpy
中。
添加回答
舉報(bào)
0/150
提交
取消