[GH-ISSUE #424] manage.py throwing error #317

Closed
opened 2026-02-27 16:38:51 +03:00 by kerem · 3 comments
Owner

Originally created by @goshlanguage on GitHub (Sep 10, 2014).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/424

I have been using a salt state to install webvirtmgr to different servers, which has been working as expected. Today I setup a server, however and I got the following error:

[root@qakvm2 webvirtmgr]# ./manage.py
Traceback (most recent call last):
File "./manage.py", line 8, in
from django.core.management import execute_from_command_line
File "/usr/lib/python2.6/site-packages/django/core/management/init.py", line 68
commands = {name: 'django.core' for name in find_commands(path[0])}
^
SyntaxError: invalid syntax

This happens anytime manage.py is called.
I've rerun the bootstrapper a few times, as well as setup.py, however I am still getting this error. I use python 2.6.6, as I use on other servers. Does anyone know how to resolve this?

Originally created by @goshlanguage on GitHub (Sep 10, 2014). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/424 I have been using a salt state to install webvirtmgr to different servers, which has been working as expected. Today I setup a server, however and I got the following error: [root@qakvm2 webvirtmgr]# ./manage.py Traceback (most recent call last): File "./manage.py", line 8, in <module> from django.core.management import execute_from_command_line File "/usr/lib/python2.6/site-packages/django/core/management/**init**.py", line 68 commands = {name: 'django.core' for name in find_commands(**path**[0])} ^ SyntaxError: invalid syntax This happens anytime manage.py is called. I've rerun the bootstrapper a few times, as well as setup.py, however I am still getting this error. I use python 2.6.6, as I use on other servers. Does anyone know how to resolve this?
kerem closed this issue 2026-02-27 16:38:51 +03:00
Author
Owner

@retspen commented on GitHub (Sep 10, 2014):

Can you try that?

$ python
>>> import django
>>> print django.__file__
<!-- gh-comment-id:55112849 --> @retspen commented on GitHub (Sep 10, 2014): Can you try that? ``` python $ python >>> import django >>> print django.__file__ ```
Author
Owner

@goshlanguage commented on GitHub (Sep 10, 2014):

[root@qakvm2 images]# python

import django
print django.file
/usr/lib/python2.6/site-packages/django/init.pyc

<!-- gh-comment-id:55125623 --> @goshlanguage commented on GitHub (Sep 10, 2014): [root@qakvm2 images]# python > > > import django > > > print django.**file** > > > /usr/lib/python2.6/site-packages/django/**init**.pyc
Author
Owner

@retspen commented on GitHub (Sep 12, 2014):

You can try new trick with virtualenv:

$ sudo pip uninstall django
$ sudo yum install python-virtualenv
$ cd /var/www/webvirtmgr
$ virtualenv --system-site-packages venv
$ source venv/bin/activate
$ pip install django==1.5.5
$ ./manage.py
<!-- gh-comment-id:55391143 --> @retspen commented on GitHub (Sep 12, 2014): You can try new trick with virtualenv: ``` bash $ sudo pip uninstall django $ sudo yum install python-virtualenv $ cd /var/www/webvirtmgr $ virtualenv --system-site-packages venv $ source venv/bin/activate $ pip install django==1.5.5 $ ./manage.py ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtmgr#317
No description provided.