我創建了這個簡單的環境conda:
conda create -n test python=3.8.5 pandas scipy numpy matplotlib seaborn jupyterlab
以下代碼會jupyter lab導致內核崩潰:
import matplotlib.pyplot as plt
plt.subplot()
我不面對這個問題Linux。問題是當我試穿時Windows 10。
jupyter lab控制臺上沒有錯誤(我啟動服務器的地方),我不知道去哪里調查。
uj5u.com熱心網友回復:
解決方案
- 如果這是在更新
conda或freetype - 在任何受影響的環境中轉到
Anaconda提示和降級freetype 2.11.0。conda install freetype=2.10.4
- 與任何使用的包相關
matplotlib- 例如,
pandas.DataFrame.plot和seaborn
- 例如,
發現
- 使用
conda10 月 29 日星期五發布的最新更新進行更新后出現問題。 - 使用 更新后
conda update --all,matplotlib任何 IDE(不僅僅是Jupyter)中的任何相關內容都存在問題。- 我在
JupyterLab、PyCharm和python命令提示符下對此進行了測驗。 - PyCharm:
Process finished with exit code -1073741819
- 我在
- 問題似乎出在
conda update --allin(base),然后任何使用matplotlib(例如seaborn和pandas.DataFrame.plot)的繪圖 API 都會在任何環境中殺死內核。 - 我不得不重新安裝 Anaconda,但不更新
(base),然后我的其他環境作業。 - 我還沒有弄清楚是什么導致了這個問題。
- 我用
python 3.8.12和測驗了這個問題python 3.9.7 - 當前測驗:
- 以下是
conda修訂日志。 - 在
conda update --all此環境之前可以正常作業,但在更新之后,繪圖matplotlib崩潰了 python 內核
- 以下是
2021-10-31 10:47:22 (rev 3)
bokeh {2.3.3 (defaults/win-64) -> 2.4.1 (defaults/win-64)}
click {8.0.1 (defaults/noarch) -> 8.0.3 (defaults/noarch)}
filelock {3.0.12 (defaults/noarch) -> 3.3.1 (defaults/noarch)}
freetype {2.10.4 (defaults/win-64) -> 2.11.0 (defaults/win-64)}
imagecodecs {2021.6.8 (defaults/win-64) -> 2021.8.26 (defaults/win-64)}
joblib {1.0.1 (defaults/noarch) -> 1.1.0 (defaults/noarch)}
lerc {2.2.1 (defaults/win-64) -> 3.0 (defaults/win-64)}
more-itertools {8.8.0 (defaults/noarch) -> 8.10.0 (defaults/noarch)}
pyopenssl {20.0.1 (defaults/noarch) -> 21.0.0 (defaults/noarch)}
scikit-learn {0.24.2 (defaults/win-64) -> 1.0.1 (defaults/win-64)}
statsmodels {0.12.2 (defaults/win-64) -> 0.13.0 (defaults/win-64)}
sympy {1.8 (defaults/win-64) -> 1.9 (defaults/win-64)}
tqdm {4.62.2 (defaults/noarch) -> 4.62.3 (defaults/noarch)}
xlwings {0.24.7 (defaults/win-64) -> 0.24.9 (defaults/win-64)}
- 問題似乎是
freetype- 降級
2.11.0以2.10.4解決問題并使環境與matplotlib
- 降級
- 去發布錯誤報告并發現有[錯誤]:Matplotlib 崩潰 Python #21511
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/345401.html
標籤:Python 视窗 matplotlib 康达 自由打字机
