gpt4 book ai didi

ubuntu - Ubuntu Virtualbox 中 Pycharm 中的 Python 控制台无法连接

转载 作者:太空宇宙 更新时间:2023-11-03 16:53:14 33 4
gpt4 key购买 nike

我正在使用 Aldryns开发 django-cms 站点的环境。

我在 Windows 10 上,它并不完美,所以我用 Virtualbox 创建了一个虚拟机 Ubuntu 16.04。在 VM 中,我安装了 Pycharm 2016.1.3。

Aldryn 的支持(不知疲倦)帮助我完成了 setup docker对 Ubuntu 和 Pycharm 的支持:

just create a file /etc/default/docker containing:

DOCKER_OPTS="-H unix:///var/run/docker.sock -H tcp://127.0.0.1:2376"

Drop the following into /etc/systemd/system/docker.service.d/daemon.conf

(create directories if they don't exist yet):

[Service]    
EnvironmentFile=/etc/default/docker
ExecStart=
ExecStart=/usr/bin/docker daemon $DOCKER_OPTS

Then issue the following two commands:

sudo systemctl daemon-reload 
sudo systemctl restart docker

现在 Pycharm 可以在 docker 容器中查看。IE。项目解释器很好地显示了所有已安装的包。

我做了所有这些,所以我可以使用 Pycharm 的 python 控制台。

(错误:Windows 尚不支持交互模式。)

现在我得到这个错误:

xyz_w:python /opt/.pycharm_helpers/pydev/pydevconsole.py 0 0

PyDev console: starting.

Couldn't connect to console process.

Process finished with exit code 143

通过终端播放它可以得到:

me@my-VirtualBox:~/xyz$ docker-compose run --rm web python manage.py shell 

/app/addons/aldryn-django/aldryn_config.py:56:

RuntimeWarning:

no cache configured. Falling back to CACHE_URL=locmem://
RuntimeWarning,

Django not found.

Python 2.7.11 (default, Mar 3 2016, 10:57:12) [GCC 4.9.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole)

我该如何解决这个问题,以便能够使用 python 控制台?

最佳答案

卸载 docker 集成插件以获得 PyCharm 的捆绑版本。 (确保您有新的 Pycharm 版本。)

来源: https://youtrack.jetbrains.com/issue/PY-18853#comment=27-1362538

关于ubuntu - Ubuntu Virtualbox 中 Pycharm 中的 Python 控制台无法连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37392268/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com