You are not logged in.

#1 2011-01-25 14:36:20

calef13
Member
Registered: 2007-06-10
Posts: 142

[SOLVED]Django installation failed

Hi,

I installed django 1.2.4-1 today from the offical repos. All seemed to go well, but when I tried to run a project (python manage.py runserver) which I made whilst following the django tutorial I get the following error:

Traceback (most recent call last):
  File "manage.py", line 2, in <module>
    from django.core.management import execute_manager
ImportError: No module named django.core.management

I've tried with python, python3 and python3.1 and they all give the same error. Although django only appears in the site-packages dir of python2.7. I couldn't find any setup.py to try and install again, although there are plenty of management folders in the python2.7 dir so it seems to be correctly installed(/usr/lib/python2.7/site-packages/django/core/management/commands/runserver.py exists for example).

I'm kind of at a loss, searching google and this forum turned up nothing, anyone have any ideas?

-Calum

Last edited by calef13 (2011-01-27 17:47:52)

Offline

#2 2011-01-26 20:50:23

kad
Member
From: Poland
Registered: 2011-01-26
Posts: 1

Re: [SOLVED]Django installation failed

Try python2 instead of python, python3 or python3.1, like this:

python2 manage.py runserver

More info: http://www.archlinux.org/news/python-is-now-python-3/

Last edited by kad (2011-01-26 20:53:41)

Offline

#3 2011-01-27 17:47:22

calef13
Member
Registered: 2007-06-10
Posts: 142

Re: [SOLVED]Django installation failed

Ah thanks, it's working now. I didn't even see the python2 exe tongue

Offline

#4 2011-03-19 02:19:02

jpt
Member
From: Rochester, NY
Registered: 2008-04-28
Posts: 31
Website

Re: [SOLVED]Django installation failed

I'm getting a similar problem with Django 1.2.5 installed via pip. 

Running python manage.py syncdb gives me:

_______________
python2 manage.py syncdb
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/home/jacques/.virtualenvs/test/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/home/jacques/.virtualenvs/test/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/jacques/.virtualenvs/test/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/jacques/.virtualenvs/test/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/home/jacques/.virtualenvs/test/lib/python2.7/site-packages/django/core/management/base.py", line 351, in handle
    return self.handle_noargs(**options)
  File "/home/jacques/.virtualenvs/test/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", line 56, in handle_noargs
    cursor = connection.cursor()
  File "/home/jacques/.virtualenvs/test/lib/python2.7/site-packages/django/db/backends/__init__.py", line 75, in cursor
    cursor = self._cursor()
  File "/home/jacques/.virtualenvs/test/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 174, in _cursor
    self.connection = Database.connect(**kwargs)
sqlite3.OperationalError: unable to open database file
______________

Any ideas? I'm new to this, if I haven't provided a something I should have please let me know.

EDIT:

One of the weird things is that I'm able to add run:

manage.py runserver

Just fine.

Last edited by jpt (2011-03-19 02:20:24)

Offline

Board footer

Powered by FluxBB