Tuesday, 15 September 2015

django - "No module named manage" in PyCharm -



django - "No module named manage" in PyCharm -

i have problem pycharm. when click on "run django console" or "run manage.py task" in "tools" get:

traceback (most recent phone call last): file "<input>", line 1, in <module> file "/home/vagrant/.pycharm_helpers/pycharm/django_manage_shell.py", line 46, in run run_module(manage_file, none, '__main__', true) file "/opt/python3.3/lib/python3.3/runpy.py", line 168, in run_module mod_name, loader, code, fname = _get_module_details(mod_name) file "/opt/python3.3/lib/python3.3/runpy.py", line 104, in _get_module_details raise importerror("no module named %s" % mod_name) importerror: no module named manage

my project , virtualenv located on virtual machine in vagrant. in pycharm customized ssh-connection , python interpreter vagrant . see actual dependencies of virtualenv in "settings" -> "python interpeter".

when click on "run django console" see command:

vagrant:///home/username/vagrant/vm/home/vagrant/venv/mezza3.3/bin/python3.3 -u /home/vagrant/.pycharm_helpers/pydev/pydevconsole.py 0 0.

it working through host terminal.

now, i'm using "start ssh session" in "tools" connect invitee django shell. want utilize main feature.

how can prepare this? thanks!

environment: pycharm 3.4.1; django 1.6.5; python 3.3; host\guest os ubuntu 12.04.

hard fix:

1) go /home/vagrant/.pycharm_helpers/pycharm/;

2) open django_manage_shell.py;

3) method run(working_dir);

4) insert strings below method

if os.getenv('pycharm_working_directory'): working_dir = os.getenv('pycharm_working_directory')

5) save file;

6) go "file" -> "settings" -> "console" -> "django console...";

7) add together "environment variables":

pycharm_working_directory = <path_to_guest_root_project_folder>.

django vagrant pycharm

No comments:

Post a Comment