admin管理员组文章数量:1392095
I'm encountering an issue where the Python kernel crashes with the message "Python Quit Unexpectedly" when attempting to plot a simple DataFrame or call an external Python script from a Jupyter notebook. Here are the details:
Environment:
- Operating System: macOS 10.14.6
- Python Version: 3.10.16
- Package Manager: Using UV's package manager to set up the virtual environment
- Matplotlib Version: 3.10.1
- NumPy Version: 2.2.3
- Pandas Version: 2.2.3
Code that Causes the Crash:
import matplotlib.pyplot as plt
import pandas as pd
simple_df = pd.DataFrame({'A': [1, 2, 3, 4, 5], 'B': [5, 4, 3, 2, 1]})
plt.plot(simple_df)
plt.show()
Additional Information:
- The crash occurs when executing the plt.show() line.
- The same issue happens when calling another Python file from a notebook cell with identical code.
- The MacBook is quite old but should still be supported.
Steps Taken:
- Verified the versions of Matplotlib, NumPy, and Pandas.
- Tried running the code in a fresh virtual environment.
Question: Has anyone else encountered this issue, and if so, how was it resolved? Are there any known compatibility issues with these library versions on macOS 10.14.6? Any suggestions or workarounds would be greatly appreciated.
本文标签:
版权声明:本文标题:numpy - "Python quit unexpectedly" when plotting dataframe in Jupyter Notebook on macOS 10.14.6 - Stack Overfl 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744780834a2624702.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论