2016-05-23 13 views
4

Ich verwende Aldryns Umgebung, um eine Django-CMS-Website zu entwickeln.Python-Konsole in Pycharm in einer Ubuntu Virtualbox schlägt fehl

Ich bin auf Windows 10, das ist nicht perfekt, also habe ich eine virtuelle Maschine Ubuntu 16.04 mit Virtualbox erstellt. Innerhalb der VM habe ich Pycharm 2016.1.3 installiert.

Aldryn Unterstützung (die unermüdliche sind) hat mir geholfen, zu setup docker Unterstützung für Ubuntu und 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 

Jetzt PyCharm der Lage ist, innerhalb des Docker Behälter zu sehen. I.e. Der Projekt-Interpreter zeigt alle installierten Pakete an.

Ich habe das alles gemacht, also könnte ich die Python-Konsole von Pycharm verwenden.

(ERROR: Der interaktive Modus ist noch nicht unter Windows unterstützt.)

Jetzt bekomme ich diesen Fehler:

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

es über ein Terminal Spielen gibt:

[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)

Wie löse ich dieses Problem, damit ich die Python-Konsole benutzen kann?

Antwort

Verwandte Themen