PyCharm 无法加载 pandas 模块



不知何故,我的PyCharm无法在Python Console中导入pandas模块。

import pandas
Backend Qt5Agg is interactive backend. Turning interactive mode on.
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

当然,当我在项目中运行脚本时,会出现同样的错误。正如您可能注意到的,我正在使用 anaconda3 环境。构建和启动新的蟒蛇环境不起作用。

/home/work/.conda/envs/siegellab/bin/python3.5 /snap/pycharm-community/169/plugins/python-ce/helpers/pydev/pydevconsole.py --mode=client --port=45913
import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['/home/work/phd/protabank'])
Python 3.5.6 |Anaconda, Inc.| (default, Aug 26 2018, 21:41:56) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.5.0 -- An enhanced Interactive Python. Type '?' for help.
PyDev console: using IPython 6.5.0
Python 3.5.6 |Anaconda, Inc.| (default, Aug 26 2018, 21:41:56) 
[GCC 7.3.0] on linux
import os
...:os.environ['PYCHARM_DEBUG'] = 'True'
...:runfile('/home/work/project/sequence_manager.py', wdir='/home/work/project')
...:
Backend Qt5Agg is interactive backend. Turning interactive mode on.
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

有趣的是,在 PyCharm 终端中通过 ipython 加载熊猫是有效的。

Python 3.6.3 |Anaconda, Inc.| (default, Oct 13 2017, 12:02:49) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import pandas
In [2]: 

numpy 和 os 模块没有出现问题。有什么建议可以让熊猫在 PyCharm 中加载吗?

存在版本不匹配。Terminal ipython使用Python 3.5,而PyCharm使用Python 3.6。

重新安装环境并匹配 python 版本可以解决问题。

最新更新