mirror of
https://github.com/retspen/webvirtmgr.git
synced 2026-04-25 23:55:57 +03:00
[GH-ISSUE #262] Upgrading from 4.0 to latest - no module named core.management #210
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ITBlogger on GitHub (Mar 13, 2014).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/262
Hi,
I'm trying to upgrade from webvirtmgr 4.0 to the latest and when I run ./manage.py syncdb I get the following:
Traceback (most recent call last):
File "./manage.py", line 8, in
from django.core.management import execute_from_command_line
ImportError: No module named core.management
Any ideas on how to fix this? I've completely uninstalled as much of the old install as I could think of.
Thanks,
Alex
@retspen commented on GitHub (Mar 14, 2014):
Django version?
@ITBlogger commented on GitHub (Mar 14, 2014):
1.5.5
@ITBlogger commented on GitHub (Mar 14, 2014):
I've tried uninstalling and reinstalling django multiple times, still get same error
@ITBlogger commented on GitHub (Mar 17, 2014):
Any ideas?
Thanks,
Alex
@retspen commented on GitHub (Mar 17, 2014):
What show this command?
$ echo $PYTHONPATH
$ python -c 'import django; print django.VERSION'
@ITBlogger commented on GitHub (Mar 17, 2014):
echo $PYTHONPATH returns a blank line
the 2nd command returns (1, 5, 5, 'final', 0)
@retspen commented on GitHub (Mar 17, 2014):
$ export PYTHONPATH=/usr/lib/python/site-packages # or path to site-package or dist-package
$ ./manage.py syncdb
@ITBlogger commented on GitHub (Mar 17, 2014):
Ran
export PYTHONPATH=/usr/lib/python2.6/site-packages
./manage.py syncdb
Got same error:
Traceback (most recent call last):
File "./manage.py", line 8, in
from django.core.management import execute_from_command_line
ImportError: No module named core.management
echo $PYTHONPATH
(now returns)
/usr/lib/python2.6/site-packages
On Mon, Mar 17, 2014 at 12:43 PM, Anatoliy Guskov
notifications@github.comwrote:
@retspen commented on GitHub (Mar 17, 2014):
$ rm -Rf /usr/lib/python2.6/site-packages/django
$ pip install django==1.5.5
@ITBlogger commented on GitHub (Mar 17, 2014):
When I ran the pip install, I got:
Downloading/unpacking django==1.5.5
Running setup.py egg_info for package django
warning: no previously-included files matching 'pycache' found
under directory ''
warning: no previously-included files matching '.py[co]' found under
directory ''
Installing collected packages: django
Running setup.py install for django
warning: no previously-included files matching 'pycache' found
under directory ''
warning: no previously-included files matching '.py[co]' found under
directory ''
changing mode of /usr/bin/django-admin.py to 755
Successfully installed django
Cleaning up...
Still get same error when I run ./manage.py syncdb
Thanks,
Alex
On Mon, Mar 17, 2014 at 1:32 PM, Anatoliy Guskov
notifications@github.comwrote:
@retspen commented on GitHub (Mar 18, 2014):
$ python
It show errors?
@ITBlogger commented on GitHub (Mar 18, 2014):
Yep.
--Alex
On Tue, Mar 18, 2014 at 6:58 AM, Anatoliy Guskov
notifications@github.comwrote:
@ITBlogger commented on GitHub (Mar 18, 2014):
In my research of this issue one thing that continually comes up is the
notion of activating an environment. We didn't need to do this with the
previous versions, but do we need to do this now?
Thanks,
Alex
On Tue, Mar 18, 2014 at 9:05 AM, Alex Scoble bloggingitguy@gmail.comwrote:
@retspen commented on GitHub (Mar 18, 2014):
This need to do if you use virtualenv. Could you show django module:
$ ls -l /usr/lib/python2.6/site-package/django
$ ls -l /usr/lib/python2.6/site-package/django/core # if exist dirctory
@ITBlogger commented on GitHub (Mar 18, 2014):
[root@dtlkvmts1 webvirtmgr]# ls -l /usr/lib/python2.6/site-packages/django/
total 68
drwxr-xr-x. 3 root root 4096 Mar 17 13:45 bin
drwxr-xr-x. 6 root root 4096 Mar 17 13:45 conf
drwxr-xr-x. 22 root root 4096 Mar 17 13:45 contrib
drwxr-xr-x. 9 root root 4096 Mar 17 13:45 core
drwxr-xr-x. 4 root root 4096 Mar 17 13:45 db
drwxr-xr-x. 2 root root 4096 Mar 17 13:45 dispatch
drwxr-xr-x. 3 root root 4096 Mar 17 13:45 forms
drwxr-xr-x. 2 root root 4096 Mar 17 13:45 http
-rwxr-xr-x. 1 root root 269 Oct 30 13:25 init.py
-rwxr-xr-x. 1 root root 464 Mar 17 13:45 init.pyc
drwxr-xr-x. 2 root root 4096 Mar 17 13:45 middleware
drwxr-xr-x. 2 root root 4096 Mar 17 13:45 shortcuts
drwxr-xr-x. 3 root root 4096 Mar 17 13:45 template
drwxr-xr-x. 2 root root 4096 Mar 17 13:45 templatetags
drwxr-xr-x. 2 root root 4096 Mar 17 13:45 test
drwxr-xr-x. 5 root root 4096 Mar 17 13:45 utils
drwxr-xr-x. 4 root root 4096 Mar 17 13:45 views
On Tue, Mar 18, 2014 at 10:12 AM, Anatoliy Guskov
notifications@github.comwrote:
@retspen commented on GitHub (Mar 18, 2014):
Do you have installed any other python3 or django project? Selinux status?
@ITBlogger commented on GitHub (Mar 18, 2014):
No other Python is installed. No other django project is installed on the
box I'm using. selinux is set to permissive.
On Tue, Mar 18, 2014 at 10:41 AM, Anatoliy Guskov
notifications@github.comwrote:
@schmitch commented on GitHub (Mar 18, 2014):
Did you tried to run
python manage.py syncdbinstead of the./manage.pysometimes this could help against env problems.@retspen commented on GitHub (Mar 18, 2014):
And you can try to change path in python in file manage.py:
#!/usr/bin/env python to #!/usr/bin/python
@ITBlogger commented on GitHub (Mar 18, 2014):
Yeah, tried both of those and no change.
By the way, I can't even run django-admin.py I get similar error (No module
named core)
On Tue, Mar 18, 2014 at 12:23 PM, Anatoliy Guskov
notifications@github.comwrote:
@retspen commented on GitHub (Mar 18, 2014):
You can try new trick with virtualenv:
@ITBlogger commented on GitHub (Mar 18, 2014):
Thanks...that worked.
On Tue, Mar 18, 2014 at 1:17 PM, Anatoliy Guskov
notifications@github.comwrote:
@retspen commented on GitHub (Mar 18, 2014):
Good news! Change line in file supervisor.conf for run automatically:
to
@ITBlogger commented on GitHub (Mar 18, 2014):
Yeah, that seemed to happen automatically.
Now I'm getting the dreaded 502 bad gateway error when I try to access the
web site. On the server these errors are showing up:
2014/03/18 14:05:13 [error] 10673#0: *5 connect() failed (111: Connection
refused) while connecting to upstream, client: , server:
dtlkvmts1.xxxx.xxxx.org, request: "GET / HTTP/1.1", upstream: "
http://127.0.0.1:8000/", host: "dtlkvmts1.xxxx.xxxx.org"
I can connect just fine when running ./manage.py runserver 0:8000
Ideas?
Thanks so much for your help so far.
On Tue, Mar 18, 2014 at 1:45 PM, Anatoliy Guskov
notifications@github.comwrote:
@ITBlogger commented on GitHub (Mar 18, 2014):
gunicorn wasn't started. When I manually do ./manage.py run_gunicorn -c
/var/www/webvirtmgr/conf/gunicorn.conf.py I am able to connect to server
just fine.
/var/www/webvirtmgr/venv/bin/python /var/www/webvirtmgr/manage.py
run_gunicorn -c /var/www/webvirtmgr/conf/gunicorn.conf.py also works
On Tue, Mar 18, 2014 at 2:22 PM, Alex Scoble bloggingitguy@gmail.comwrote:
@ITBlogger commented on GitHub (Mar 18, 2014):
When I do 'supervisorctl status' nothing shows up. Shouldn't webvirtmgr
show up?
Also, your install says to put the lines in /etc/supervisor.conf shouldn't
it be added to /etc/supervisord.conf?
On Tue, Mar 18, 2014 at 2:36 PM, Alex Scoble bloggingitguy@gmail.comwrote:
@ITBlogger commented on GitHub (Mar 18, 2014):
Yep, when I moved the stuff from /etc/supervisor.conf to
/etc/supervisord.conf and restarted supervisord service, I can now access
web server.
Looks like the docs may need to be updated for CentOS/RHEL.
On Tue, Mar 18, 2014 at 2:43 PM, Alex Scoble bloggingitguy@gmail.comwrote:
@ITBlogger commented on GitHub (Mar 18, 2014):
I fixed the docs. :D Thanks!
On Tue, Mar 18, 2014 at 2:45 PM, Alex Scoble bloggingitguy@gmail.comwrote:
@ITBlogger commented on GitHub (Mar 18, 2014):
For using SSH keys for authentication, I'm guessing that the key should be
created without a password, is that correct?
On Tue, Mar 18, 2014 at 2:49 PM, Alex Scoble bloggingitguy@gmail.comwrote:
@retspen commented on GitHub (Mar 19, 2014):
Yes, it is.
@ITBlogger commented on GitHub (Apr 11, 2014):
I'm having similar problems getting webvirtmgr-novnc to run. When I start the service it crashes and when I cat the reason file in the python dump it says "webvirtmgr-novnc:22::ImportError: No module named django"
/var/www/webvirtmgr/console/webvirtmgr-novnc is not set up to use the venv python environment that we set up.
How do I do that?
Thanks,
Alex
@retspen commented on GitHub (Apr 11, 2014):
You need to change in file webvirtmgr-novnc:
#!/usr/bin/env python TO #!/var/www/webvirtmgr/venv/bin/python
@ITBlogger commented on GitHub (Apr 11, 2014):
Thanks, I should have caught that.
Now it is returning "webvirtmgr-novnc:26::ImportError: No module
named novnc"
--Alex
On Fri, Apr 11, 2014 at 11:40 AM, Anatoliy Guskov
notifications@github.comwrote:
@ITBlogger commented on GitHub (Apr 14, 2014):
Any ideas on why the novnc module can't be found?
Thanks,
Alex
On Fri, Apr 11, 2014 at 11:56 AM, Alex Scoble bloggingitguy@gmail.comwrote:
@retspen commented on GitHub (Apr 15, 2014):
$ sudo yum install gcc
$ source /var/www/webvirtmgr/venv/bin/activate
$ pip install websockify