PyCharm:配置Python控制台

时间:2017-04-12 14:04:18

标签: python terminal pycharm

我在Ubuntu VM框上运行Conda环境(没有显示)。我正在尝试使用PyCharm,但PyCharm Python控制台由于某种原因未能正确导入库。例如。 import pandas给出:

Backend Qt5Agg is interactive backend. Turning interactive mode on.
QXcbConnection: Could not connect to display  bash: line 1: 12547
Aborted                 (core dumped) env "PYTHONUNBUFFERED"="1"
 "PYTHONPATH"="/home/local/US/me/max:/home/local/US/me/.pycharm_helpers/pydev"
 "PYCHARM_HOSTED"="1" "IPYTHONENABLE"="True"
 "PYTHONDONTWRITEBYTECODE"="1" "JETBRAINS_REMOTE_RUN"="1"
 "PYTHONIOENCODING"="UTF-8"

/home/local/US/me/conda/envs/research/bin/python2.7
/home/local/US/me/.pycharm_helpers/pydev/pydevconsole.py 0 0 Process
finished with exit code 134

我尝试卸载并重新安装pandasconda,所有内容都没有修复。此外,当我在PyCharm中从终端运行Python或IPython时,一切都运行良好。我可以根据需要导入所有包,没有错误。

1 个答案:

答案 0 :(得分:0)

也许你没有选择正确的python解释器。在this

等设置中选择正确

另请参阅此https://www.jetbrains.com/help/pycharm/2017.1/configuring-python-interpreter-for-a-project.html

此外,你可以在ssh中使用-X(大x)进行X转发