2016-05-23 99 views
4

我使用Aldryns環境來開發django-cms站點。Ubuntu Virtualbox中的Pycharm中的Python控制檯無法連接

我在Windows 10上,這是不完美的,所以我創建了一個虛擬機Ubuntu 16.04與Virtualbox。在VM中,我安裝了Pycharm 2016.1.3。

Aldryn支持(誰是不知疲倦的)幫助我的Ubuntu和Pycharm setup docker支持:

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能夠泊塢窗容器內看到。 也就是說項目解釋器很好地顯示了所有已安裝的軟件包。

我做了所有這些,所以我可以使用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

通過終端播放它給:

[email protected]:~/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控制檯?

回答

相關問題