Re: "ImportError: No module named django"

2013-04-16 Thread Nathan Hall
Ok, that was it, being completely unfamiliar with the Mac Terminal, I was
in the wrong directory. I navigated to the proper directory and got it
installed. Thanks for the help guys!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: "ImportError: No module named django"

2013-04-15 Thread Nikolas Stevenson-Molnar
Are you in the same directory as Django-1.5.1.tar.gz?

_Nik

On 4/15/2013 1:47 PM, Nathan Hall wrote:
> I've never used pip or virtualenv.
>
> When I did this: tar xzvf Django-1.5.1.tar.gz
>
> I got this:
> tar: Error opening archive: Failed to open 'Django-1.5.1.tar.gz'
>
>
>
> On Mon, Apr 15, 2013 at 4:40 PM, Avraham Serour  > wrote:
>
> doesn't pip and virtualenv work on mac?
>
>
> On Mon, Apr 15, 2013 at 11:37 PM, Larry Martell
> > wrote:
>
> On Mon, Apr 15, 2013  at 2:34 PM, Nathan Hall
> > wrote:
> > Yep, I've got admin access, it's my personal machine.
> >
> > Actually, I looked again and it may not have been a password
> issue, this was
> > the message I received: "python: can't open file 'setup.py':
> [Errno 2] No
> > such file or directory"
>
> Then you were not in the correct directory. Follow the
> instructions on
> this page:
>
> https://www.djangoproject.com/download/
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: "ImportError: No module named django"

2013-04-15 Thread Larry Martell
On Mon, Apr 15, 2013 at 2:47 PM, Nathan Hall  wrote:
> I've never used pip or virtualenv.
>
> When I did this: tar xzvf Django-1.5.1.tar.gz
>
> I got this:
> tar: Error opening archive: Failed to open 'Django-1.5.1.tar.gz'

Then either you're not in the directory it was downloaded to
(typically ~/Downloads) or the download failed. Try running a find for
it from your home dir.


> On Mon, Apr 15, 2013 at 4:40 PM, Avraham Serour  wrote:
>>
>> doesn't pip and virtualenv work on mac?
>>
>>
>> On Mon, Apr 15, 2013 at 11:37 PM, Larry Martell 
>> wrote:
>>>
>>> On Mon, Apr 15, 2013 at 2:34 PM, Nathan Hall  wrote:
>>> > Yep, I've got admin access, it's my personal machine.
>>> >
>>> > Actually, I looked again and it may not have been a password issue,
>>> > this was
>>> > the message I received: "python: can't open file 'setup.py': [Errno 2]
>>> > No
>>> > such file or directory"
>>>
>>> Then you were not in the correct directory. Follow the instructions on
>>> this page:
>>>
>>> https://www.djangoproject.com/download/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: "ImportError: No module named django"

2013-04-15 Thread Nathan Hall
I've never used pip or virtualenv.

When I did this: tar xzvf Django-1.5.1.tar.gz

I got this:
tar: Error opening archive: Failed to open 'Django-1.5.1.tar.gz'



On Mon, Apr 15, 2013 at 4:40 PM, Avraham Serour  wrote:

> doesn't pip and virtualenv work on mac?
>
>
> On Mon, Apr 15, 2013 at 11:37 PM, Larry Martell 
> wrote:
>
>> On Mon, Apr 15, 2013 at 2:34 PM, Nathan Hall  wrote:
>> > Yep, I've got admin access, it's my personal machine.
>> >
>> > Actually, I looked again and it may not have been a password issue,
>> this was
>> > the message I received: "python: can't open file 'setup.py': [Errno 2]
>> No
>> > such file or directory"
>>
>> Then you were not in the correct directory. Follow the instructions on
>> this page:
>>
>> https://www.djangoproject.com/download/
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: "ImportError: No module named django"

2013-04-15 Thread Avraham Serour
doesn't pip and virtualenv work on mac?


On Mon, Apr 15, 2013 at 11:37 PM, Larry Martell wrote:

> On Mon, Apr 15, 2013 at 2:34 PM, Nathan Hall  wrote:
> > Yep, I've got admin access, it's my personal machine.
> >
> > Actually, I looked again and it may not have been a password issue, this
> was
> > the message I received: "python: can't open file 'setup.py': [Errno 2] No
> > such file or directory"
>
> Then you were not in the correct directory. Follow the instructions on
> this page:
>
> https://www.djangoproject.com/download/
>
> > On Mon, Apr 15, 2013 at 4:29 PM, Larry Martell 
> > wrote:
> >>
> >> On Mon, Apr 15, 2013 at 2:24 PM, Nathan Hall  wrote:
> >> > I tried my password, it doesn't work.
> >>
> >> Go to System Preferences, Users and Groups. Is your account an Admin
> >> account? If not, you can't sudo. You'll need someone with an admin
> >> account to install it for you. But if you don't have an admin account
> >> how is it that you 'dropped the Django directory into
> >> /Library/Python/2.7/site-packages?' You'd need root access to do that.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to django-users+unsubscr...@googlegroups.com.
> > To post to this group, send email to django-users@googlegroups.com.
> > Visit this group at http://groups.google.com/group/django-users?hl=en.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: "ImportError: No module named django"

2013-04-15 Thread Larry Martell
On Mon, Apr 15, 2013 at 2:34 PM, Nathan Hall  wrote:
> Yep, I've got admin access, it's my personal machine.
>
> Actually, I looked again and it may not have been a password issue, this was
> the message I received: "python: can't open file 'setup.py': [Errno 2] No
> such file or directory"

Then you were not in the correct directory. Follow the instructions on
this page:

https://www.djangoproject.com/download/

> On Mon, Apr 15, 2013 at 4:29 PM, Larry Martell 
> wrote:
>>
>> On Mon, Apr 15, 2013 at 2:24 PM, Nathan Hall  wrote:
>> > I tried my password, it doesn't work.
>>
>> Go to System Preferences, Users and Groups. Is your account an Admin
>> account? If not, you can't sudo. You'll need someone with an admin
>> account to install it for you. But if you don't have an admin account
>> how is it that you 'dropped the Django directory into
>> /Library/Python/2.7/site-packages?' You'd need root access to do that.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: "ImportError: No module named django"

2013-04-15 Thread Nathan Hall
Yep, I've got admin access, it's my personal machine.

Actually, I looked again and it may not have been a password issue, this
was the message I received: "python: can't open file 'setup.py': [Errno 2]
No such file or directory"

On Mon, Apr 15, 2013 at 4:29 PM, Larry Martell wrote:

> On Mon, Apr 15, 2013 at 2:24 PM, Nathan Hall  wrote:
> > I tried my password, it doesn't work.
>
> Go to System Preferences, Users and Groups. Is your account an Admin
> account? If not, you can't sudo. You'll need someone with an admin
> account to install it for you. But if you don't have an admin account
> how is it that you 'dropped the Django directory into
> /Library/Python/2.7/site-packages?' You'd need root access to do that.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: "ImportError: No module named django"

2013-04-15 Thread Larry Martell
On Mon, Apr 15, 2013 at 2:24 PM, Nathan Hall  wrote:
> I tried my password, it doesn't work.

Go to System Preferences, Users and Groups. Is your account an Admin
account? If not, you can't sudo. You'll need someone with an admin
account to install it for you. But if you don't have an admin account
how is it that you 'dropped the Django directory into
/Library/Python/2.7/site-packages?' You'd need root access to do that.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: "ImportError: No module named django"

2013-04-15 Thread Nathan Hall
I tried my password, it doesn't work.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: "ImportError: No module named django"

2013-04-15 Thread Larry Martell
On Mon, Apr 15, 2013 at 2:02 PM, Nathan Hall  wrote:
>
> Yep, I'm on 10.8.3. I tried sudo python setup.py install and it asked for
> a password. I assumed it was just looking for my system password but that
> didn't work.

It's asking for your own password.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: "ImportError: No module named django"

2013-04-15 Thread Nathan Hall
Yep, I'm on 10.8.3. I tried sudo python setup.py install and it asked for a
password. I assumed it was just looking for my system password but that
didn't work.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: "ImportError: No module named django"

2013-04-15 Thread Nikolas Stevenson-Molnar
This is likely the cause of the problem. You should always install
packages with setup.py (as mentioned by the previous poster). I've found
Mac OS X to have lots of "false" site-packages folders. setup.py will
make sure it gets to the correct one. Also some packages may have extra
installation steps (not sure if Django does) which are skipped if you
simply drop the source into place.

_Nik

On 4/15/2013 11:40 AM, Starboy wrote:
> and have dropped the Django directory into
> /Library/Python/2.7/site-packages on my mac

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: "ImportError: No module named django"

2013-04-15 Thread Larry Martell
On Mon, Apr 15, 2013 at 12:40 PM, Starboy <nmh...@gmail.com> wrote:
> Hi all,
>
> Totally new to django and just trying to get it installed but I keep getting
> the "ImportError: No module named django" error. I've searched around quite
> a bit looking for the answer to my problem but nothing seems to work.
>
> I'm running python vers 2.7.2 and have dropped the Django directory into
> /Library/Python/2.7/site-packages on my mac.
>
> When I run import django I get:
> Traceback (most recent call last):
>   File "", line 1, in 
> ImportError: No module named django
>
> Sorry this is such a newb question, I just can't get it to work.

Is this on 10.8? I just did a django install on 10.8 this weekend. How
did you install it? After downloading it and un-taring it I just did:

sudo python setup.py install

and it worked.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




"ImportError: No module named django"

2013-04-15 Thread Starboy
Hi all, 

Totally new to django and just trying to get it installed but I keep 
getting the "ImportError: No module named django" error. I've searched 
around quite a bit looking for the answer to my problem but nothing seems 
to work.

I'm running python vers 2.7.2 and have dropped the Django directory into 
/Library/Python/2.7/site-packages on my mac. 

When I run import django I get:
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named django

Sorry this is such a newb question, I just can't get it to work.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: ImportError: No module named django

2011-11-21 Thread victoria
Hi,

You mentioned that you installed BitNami DjangoStack. For using it you
should first go to the Windows Start Menu and click in the 'Use
DjangoStack" link. Then you can execute python and 'import django'
should work. You also have Python 2.7 installed so if you don't load
the BitNami environment first you will be working with the version of
Python that you installed and that doesn't include django by default.

Best regars,

Victoria.

On Sat, Nov 19, 2011 at 12:52 PM, Tim Makobu
<makobu.mwambir...@gmail.com> wrote:
> Hi,
> Also, If you haven't read ALL of this
> yet http://docs.python.org/tutorial/index.html go ahead and do so.
>
> On Sat, Nov 19, 2011 at 2:29 PM, Jenny <email@gmail.com> wrote:
>>
>> Thank you Furbee. I will try later to to put the unpacked Django in
>> the same folder as setup.py folder. I'll be back soon with the
>> result.
>>
>> On 18 Nov, 23:02, Furbee <furbeena...@gmail.com> wrote:
>> > You can get to the python interactive interpreter by typing "python"
>> > into a
>> > Dos shell, as long as the python executable is in your system path. The
>> > IDLE command line should work, also. In the Python folder there should
>> > be a
>> > site-packages folder which contains a folder named django. The "import
>> > django" command is attempting to import from there by default. So, if
>> > that
>> > is failing, the django site package must not be installed properly. When
>> > you download the Django package as a zip file, extract it to a location.
>> > From that location there is a setup.py file. From a shell go to that
>> > location and enter "python setup.py install". This should install the
>> > Django framework into the Python site-packages folder, and the "import
>> > django" should work from a python shell.
>> >
>> > Cheers,
>> >
>> > Furbee
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > On Fri, Nov 18, 2011 at 12:14 PM, Jenny <email@gmail.com> wrote:
>> > > I am as newbie as for two hours ago I installed Python 2.7.2 and an
>> > > hour ago installed BitNami DjangoStack 1.3.1 on my Windows 7 machine.
>> > > I am trying to start with a tutorial on the Djangos website which
>> > > says:
>> > > "You can tell Django is installed by running the Python interactive
>> > > interpreter and typing import django"
>> >
>> > > I assume that the "Python interactive interpreter" is IDLE (Python
>> > > GUI). When i run it and on the command line I write "import django", I
>> > > get a message as follwoing:
>> > > >>> import django
>> > > Traceback (most recent call last):
>> > >  File "<pyshell#6>", line 1, in 
>> > >    import django
>> > > ImportError: No module named django
>> >
>> > > Would you please give me help some advice what to do here? Many
>> > > thanks.
>> >
>> > > --
>> > > You received this message because you are subscribed to the Google
>> > > Groups
>> > > "Django users" group.
>> > > To post to this group, send email to django-users@googlegroups.com.
>> > > To unsubscribe from this group, send email to
>> > > django-users+unsubscr...@googlegroups.com.
>> > > For more options, visit this group at
>> > >http://groups.google.com/group/django-users?hl=en.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: ImportError: No module named django

2011-11-19 Thread Tim Makobu
Hi,

Also, If you haven't read ALL of this yet
http://docs.python.org/tutorial/index.html go ahead and do so.


On Sat, Nov 19, 2011 at 2:29 PM, Jenny <email@gmail.com> wrote:

> Thank you Furbee. I will try later to to put the unpacked Django in
> the same folder as setup.py folder. I'll be back soon with the
> result.
>
> On 18 Nov, 23:02, Furbee <furbeena...@gmail.com> wrote:
> > You can get to the python interactive interpreter by typing "python"
> into a
> > Dos shell, as long as the python executable is in your system path. The
> > IDLE command line should work, also. In the Python folder there should
> be a
> > site-packages folder which contains a folder named django. The "import
> > django" command is attempting to import from there by default. So, if
> that
> > is failing, the django site package must not be installed properly. When
> > you download the Django package as a zip file, extract it to a location.
> > From that location there is a setup.py file. From a shell go to that
> > location and enter "python setup.py install". This should install the
> > Django framework into the Python site-packages folder, and the "import
> > django" should work from a python shell.
> >
> > Cheers,
> >
> > Furbee
> >
> >
> >
> >
> >
> >
> >
> > On Fri, Nov 18, 2011 at 12:14 PM, Jenny <email@gmail.com> wrote:
> > > I am as newbie as for two hours ago I installed Python 2.7.2 and an
> > > hour ago installed BitNami DjangoStack 1.3.1 on my Windows 7 machine.
> > > I am trying to start with a tutorial on the Djangos website which
> > > says:
> > > "You can tell Django is installed by running the Python interactive
> > > interpreter and typing import django"
> >
> > > I assume that the "Python interactive interpreter" is IDLE (Python
> > > GUI). When i run it and on the command line I write "import django", I
> > > get a message as follwoing:
> > > >>> import django
> > > Traceback (most recent call last):
> > >  File "<pyshell#6>", line 1, in 
> > >import django
> > > ImportError: No module named django
> >
> > > Would you please give me help some advice what to do here? Many thanks.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Django users" group.
> > > To post to this group, send email to django-users@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > django-users+unsubscr...@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: ImportError: No module named django

2011-11-19 Thread Jenny
Thank you Furbee. I will try later to to put the unpacked Django in
the same folder as setup.py folder. I'll be back soon with the
result.

On 18 Nov, 23:02, Furbee <furbeena...@gmail.com> wrote:
> You can get to the python interactive interpreter by typing "python" into a
> Dos shell, as long as the python executable is in your system path. The
> IDLE command line should work, also. In the Python folder there should be a
> site-packages folder which contains a folder named django. The "import
> django" command is attempting to import from there by default. So, if that
> is failing, the django site package must not be installed properly. When
> you download the Django package as a zip file, extract it to a location.
> From that location there is a setup.py file. From a shell go to that
> location and enter "python setup.py install". This should install the
> Django framework into the Python site-packages folder, and the "import
> django" should work from a python shell.
>
> Cheers,
>
> Furbee
>
>
>
>
>
>
>
> On Fri, Nov 18, 2011 at 12:14 PM, Jenny <email@gmail.com> wrote:
> > I am as newbie as for two hours ago I installed Python 2.7.2 and an
> > hour ago installed BitNami DjangoStack 1.3.1 on my Windows 7 machine.
> > I am trying to start with a tutorial on the Djangos website which
> > says:
> > "You can tell Django is installed by running the Python interactive
> > interpreter and typing import django"
>
> > I assume that the "Python interactive interpreter" is IDLE (Python
> > GUI). When i run it and on the command line I write "import django", I
> > get a message as follwoing:
> > >>> import django
> > Traceback (most recent call last):
> >  File "<pyshell#6>", line 1, in 
> >    import django
> > ImportError: No module named django
>
> > Would you please give me help some advice what to do here? Many thanks.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: ImportError: No module named django

2011-11-18 Thread Furbee
You can get to the python interactive interpreter by typing "python" into a
Dos shell, as long as the python executable is in your system path. The
IDLE command line should work, also. In the Python folder there should be a
site-packages folder which contains a folder named django. The "import
django" command is attempting to import from there by default. So, if that
is failing, the django site package must not be installed properly. When
you download the Django package as a zip file, extract it to a location.
>From that location there is a setup.py file. From a shell go to that
location and enter "python setup.py install". This should install the
Django framework into the Python site-packages folder, and the "import
django" should work from a python shell.

Cheers,

Furbee

On Fri, Nov 18, 2011 at 12:14 PM, Jenny <email@gmail.com> wrote:

> I am as newbie as for two hours ago I installed Python 2.7.2 and an
> hour ago installed BitNami DjangoStack 1.3.1 on my Windows 7 machine.
> I am trying to start with a tutorial on the Djangos website which
> says:
> "You can tell Django is installed by running the Python interactive
> interpreter and typing import django"
>
> I assume that the "Python interactive interpreter" is IDLE (Python
> GUI). When i run it and on the command line I write "import django", I
> get a message as follwoing:
> >>> import django
> Traceback (most recent call last):
>  File "<pyshell#6>", line 1, in 
>import django
> ImportError: No module named django
>
> Would you please give me help some advice what to do here? Many thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



ImportError: No module named django

2011-11-18 Thread Jenny
I am as newbie as for two hours ago I installed Python 2.7.2 and an
hour ago installed BitNami DjangoStack 1.3.1 on my Windows 7 machine.
I am trying to start with a tutorial on the Djangos website which
says:
"You can tell Django is installed by running the Python interactive
interpreter and typing import django"

I assume that the "Python interactive interpreter" is IDLE (Python
GUI). When i run it and on the command line I write "import django", I
get a message as follwoing:
>>> import django
Traceback (most recent call last):
  File "<pyshell#6>", line 1, in 
import django
ImportError: No module named django

Would you please give me help some advice what to do here? Many thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: "ImportError: No module named django" with MacPorts

2010-03-03 Thread Steven R. Elliott Jr
Hello Tim,

I'm a fellow Mac user but I don't quite understand the problem that you are
having installing Django on OS X 10.6.

I installed Django today on a new Mac and it took all of 5 minutes and I
downloaded the tarball, extracted it and threw it in my home directory.

I believe that 10.6 comes comes with Python 2.6.1 out of the box so there
shouldn't have been a need to install 2.5 unless you are married to 2.5 for
some reason. Also, when you ran the python setup.py install command did you
run it as superuser? so, you need to plop sudo in front of your command...
if not, it won't have all the permissions it needs to install into your
system properly. Lastly, do you have the Apple Developer tools installed?

Not sure if any of this helps but I know that when I ran the install command
and didn't use:
*sudo* python setup.py install it crapped itself and complained that it
didn't have permission.

Good luck,
Steve

On Wed, Mar 3, 2010 at 2:15 PM, Tones <t...@tjones.cc> wrote:

> Hi --
>
> I'm attempting to run Django on OSX 10.6. I've installed Python2.5 and
> Py25-Django (Django v1.1) via MacPorts. But I am receiving the famed
> "ImportError: No module named django" error.
>
> Django is installed in this directory:
> /opt/local/lib/python2.5/site-packages/django/
>
> To check my $PYTHONPATH, I went to the Python shell and tried "print
> sys.path". The site-packages path is indeed included in my PYTHONPATH.
>
> However, when I try "print sys.modules" in the same Python shell,
> Django is not included.
>
> I can't figure out what's going on. Django's INSTALL.TXT says all
> that's needed to install Django is to copy it into the site-packages
> directory. But in this case that hasn't worked. Is something else
> needed to give Python access to Django?
>
> I suppose I could forget MacPorts and attempt to install from SVN or a
> tarball. But I would really prefer to work through the package
> manager, especially since it's so unclear what has gone wrong.
>
> Any thoughts appreciated. Thanks.
>
> =Tim=
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: "ImportError: No module named django" with MacPorts

2010-03-03 Thread CLIFFORD ILKAY

On 03/03/2010 07:27 PM, Tim Jones wrote:

So I tried specifying the site-packages path at the top of my script
and it removed the ImportError. That makes it seem like my
web-server's pythong is running with different pythonpath settings
than my command-line's python. I think I can probably unravel the
mystery from there.


You'll find virtualenv and virtualenvwrapper are invaluable for such things.
--
Regards,

Clifford Ilkay
Dinamis
1419-3266 Yonge St.
Toronto, ON
Canada  M4N 3P6


+1 416-410-3326

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: "ImportError: No module named django" with MacPorts

2010-03-03 Thread Tim Jones
Sorry, I should clarify.

When I wrote:
> So I tried specifying the site-packages path at the top of my script...

I meant that I added these lines:
~~
import sys
sys.path.insert(0, "/opt/local/lib/python2.5/site-packages")
~~

=T=


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: "ImportError: No module named django" with MacPorts

2010-03-03 Thread Tim Jones
Aha, that is helpful. I think I've partially solved this now.

If I run 'import django' at the command line, then it seems to import fine; 
there is no error message, and 'print sys.modules' now lists it.

So I tried specifying the site-packages path at the top of my script and it 
removed the ImportError. That makes it seem like my web-server's pythong is 
running with different pythonpath settings than my command-line's python. I 
think I can probably unravel the mystery from there. 

I'm actually attempting to run this all in Google App Engine. Just to keep 
things as complicated as possible. So the lines generating the error were
~~
from google.appengine.dist import use_library
use_library('django','1.1')
~~

=T=




On Mar 3, 2010, at 4:20 PM, Shawn Milochik wrote:

> Printing sys.modules won't show django unless you've imported Django.
> 
> What are you trying to do, anyway? You don't normally import Django in a 
> Python script. You usually start a Django project by using django-admin.py 
> and letting it create a manage.py which uses the proper Python.
> 
> Search your system for django-admin.py and see where it lies. Try executing 
> it in a few different ways:
> 
> python django-admin.py startproject fake_project_name
> django-admin.py startproject fake_project_name
> /explicit/path/to/some/python/installation/python django-admin.py 
> startproject fake_project_name
> 
> Let us know what you get.
> 
> Shawn
> 
> 
> On Mar 3, 2010, at 7:12 PM, Tim Jones wrote:
> 
>> Thanks for the reply.
>> 
>> "which python" returns: /opt/local/bin/python
>> 
>> "python -V" returns: Python 2.5.5
>> 
>> I know I've got the OSX default Pythons installed as well, but I've done my 
>> best to avoid running those.
>> 
>> Like I said in my first email, printing sys.path in the python prompt 
>> returns a big list of directories, including  
>> "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages",
>>  which contains the django installation.
>> 
>> But when I run "print sys.modules", Django is not included. It doesnt make 
>> sense to me that Django isn't included in sys.modules even though it's 
>> installed in a dir listed by sys.path.
>> 
>> I'm a noob to both Python and Django so apologies if I'm missing something 
>> obvious.
>> 
>> =T=
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: "ImportError: No module named django" with MacPorts

2010-03-03 Thread Shawn Milochik
Printing sys.modules won't show django unless you've imported Django.

What are you trying to do, anyway? You don't normally import Django in a Python 
script. You usually start a Django project by using django-admin.py and letting 
it create a manage.py which uses the proper Python.

Search your system for django-admin.py and see where it lies. Try executing it 
in a few different ways:

python django-admin.py startproject fake_project_name
django-admin.py startproject fake_project_name
/explicit/path/to/some/python/installation/python django-admin.py startproject 
fake_project_name

Let us know what you get.

Shawn


On Mar 3, 2010, at 7:12 PM, Tim Jones wrote:

> Thanks for the reply.
> 
> "which python" returns: /opt/local/bin/python
> 
> "python -V" returns: Python 2.5.5
> 
> I know I've got the OSX default Pythons installed as well, but I've done my 
> best to avoid running those.
> 
> Like I said in my first email, printing sys.path in the python prompt returns 
> a big list of directories, including  
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages",
>  which contains the django installation.
> 
> But when I run "print sys.modules", Django is not included. It doesnt make 
> sense to me that Django isn't included in sys.modules even though it's 
> installed in a dir listed by sys.path.
> 
> I'm a noob to both Python and Django so apologies if I'm missing something 
> obvious.
> 
> =T=

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: "ImportError: No module named django" with MacPorts

2010-03-03 Thread Tim Jones
Thanks for the reply.

"which python" returns: /opt/local/bin/python

"python -V" returns: Python 2.5.5

I know I've got the OSX default Pythons installed as well, but I've done my 
best to avoid running those.

Like I said in my first email, printing sys.path in the python prompt returns a 
big list of directories, including  
"/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages",
 which contains the django installation.

But when I run "print sys.modules", Django is not included. It doesnt make 
sense to me that Django isn't included in sys.modules even though it's 
installed in a dir listed by sys.path.

I'm a noob to both Python and Django so apologies if I'm missing something 
obvious.

=T=




On Mar 3, 2010, at 4:04 PM, Shawn Milochik wrote:

> Please post the results of these commands:
> 
> which python
> 
> python -V
> 
> 
> 
> 
> You can have different versions of Python installed (or even the same 
> version) in multiple places on your Mac. The most likely situation is that 
> when you're trying to actually run things you're using different version of 
> Python than the one that has Django install. your PYTHONPATH is only part of 
> the story, since packages on that path for one version of Python won't work 
> when you're running another Python version.
> 
> For bonus points, run Python at the command line and do these:
> 
> import sys
> sys.path
> 
> That will tell you where your current instance of Python is looking for 
> modules.
> 
> Shawn
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: "ImportError: No module named django" with MacPorts

2010-03-03 Thread Shawn Milochik
Please post the results of these commands:

which python

python -V




You can have different versions of Python installed (or even the same version) 
in multiple places on your Mac. The most likely situation is that when you're 
trying to actually run things you're using different version of Python than the 
one that has Django install. your PYTHONPATH is only part of the story, since 
packages on that path for one version of Python won't work when you're running 
another Python version.

For bonus points, run Python at the command line and do these:

import sys
sys.path

That will tell you where your current instance of Python is looking for modules.

Shawn


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: "ImportError: No module named django" with MacPorts

2010-03-03 Thread Tones
I attempted installation via tarball instead of MacPorts. This had no
effect on things. Same files in the same places, same error.

=T=




On Mar 3, 11:15 am, Tones <t...@tjones.cc> wrote:
> Hi --
>
> I'm attempting to run Django on OSX 10.6. I've installed Python2.5 and
> Py25-Django (Django v1.1) via MacPorts. But I am receiving the famed
> "ImportError: No module named django" error.
>
> Django is installed in this directory:
> /opt/local/lib/python2.5/site-packages/django/
>
> To check my $PYTHONPATH, I went to the Python shell and tried "print
> sys.path". The site-packages path is indeed included in my PYTHONPATH.
>
> However, when I try "print sys.modules" in the same Python shell,
> Django is not included.
>
> I can't figure out what's going on. Django's INSTALL.TXT says all
> that's needed to install Django is to copy it into the site-packages
> directory. But in this case that hasn't worked. Is something else
> needed to give Python access to Django?
>
> I suppose I could forget MacPorts and attempt to install from SVN or a
> tarball. But I would really prefer to work through the package
> manager, especially since it's so unclear what has gone wrong.
>
> Any thoughts appreciated. Thanks.
>
> =Tim=

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



"ImportError: No module named django" with MacPorts

2010-03-03 Thread Tones
Hi --

I'm attempting to run Django on OSX 10.6. I've installed Python2.5 and
Py25-Django (Django v1.1) via MacPorts. But I am receiving the famed
"ImportError: No module named django" error.

Django is installed in this directory:
/opt/local/lib/python2.5/site-packages/django/

To check my $PYTHONPATH, I went to the Python shell and tried "print
sys.path". The site-packages path is indeed included in my PYTHONPATH.

However, when I try "print sys.modules" in the same Python shell,
Django is not included.

I can't figure out what's going on. Django's INSTALL.TXT says all
that's needed to install Django is to copy it into the site-packages
directory. But in this case that hasn't worked. Is something else
needed to give Python access to Django?

I suppose I could forget MacPorts and attempt to install from SVN or a
tarball. But I would really prefer to work through the package
manager, especially since it's so unclear what has gone wrong.

Any thoughts appreciated. Thanks.

=Tim=

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: "ImportError No module named django"

2008-07-10 Thread MadMax007

Great!

and I just want to say thank you to everyone that helped me with this
problem, it is very much appreciated.

On Jul 9, 6:03 pm, "Peter Herndon" <[EMAIL PROTECTED]> wrote:
> Yes, the install worked.  If you can import a module without error,
> it's installed successfully.
>
> Mostly. ;)  You can also successfully import a module even if it is
> not on PYTHON_PATH, if you are in the same directory as the module.
>
> ---Peter Herndon
>
> On 7/9/08, MadMax007 <[EMAIL PROTECTED]> wrote:
>
>
>
> > Thanks for the links I'll check them out
>
> > One last question, I re-did the installation for Django using some
> > instructions I found on Google. When I open Python now and type:
>
>  import.django
>  django.VERSION
>  (0,96 ) "There's something else after the 0, 96 but I can't remember
>  what it is sorry, (I'm writing this post from work)
>
> > Does this mean that the install worked this time ?
>
> > On Jul 8, 11:04 pm, Julien Phalip <[EMAIL PROTECTED]> wrote:
> >> Apparently Django is not present in the PYTHONPATH and therefore not
> >> reachable by Python.
> >> I'm not a Mac user, but some help can be found on google.
>
> >> Try there for
> >> example:http://antoniocangiano.com/2007/12/22/how-to-install-django-with-mysq..
>
> >> In the first link, the section "Telling Python where Django is" looks
> >> like what you're after.
>
> >> Cheers,
>
> >> Julien
>
> >> On Jul 9, 12:34 pm, MadMax007 <[EMAIL PROTECTED]> wrote:
>
> >> > Ok, for the PYTHONPATH I got:
>
> >> > >>> import sys
> >> > >>> print sys.path
>
> >> > ['', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
> >> > python25.zip', '/System/Library/Frameworks/Python.framework/Versions/
> >> > 2.5/lib/python2.5', '/System/Library/Frameworks/Python.framework/
> >> > Versions/2.5/lib/python2.5/plat-darwin', '/System/Library/Frameworks/
> >> > Python.framework/Versions/2.5/lib/python2.5/plat-mac', '/System/
> >> > Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-
> >> > mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/
> >> > Versions/2.5/Extras/lib/python', '/System/Library/Frameworks/
> >> > Python.framework/Versions/2.5/lib/python2.5/lib-tk', '/System/Library/
> >> > Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload', '/
> >> > Library/Python/2.5/site-packages', '/System/Library/Frameworks/
> >> > Python.framework/Versions/2.5/Extras/lib/python/PyObjC']
>
> >> > Hope this tells you something, I relatively new to Apple computers so
> >> > I feel a bit lost, and to top things off, I'm new to Python as well :
> >> > (
>
> >> > On Jul 8, 5:42 pm, Julien Phalip <[EMAIL PROTECTED]> wrote:
>
> >> > > Hi,
>
> >> > > This means that Django is not in the PYTHONPATH. To check what's in
> >> > > that path, run the following in Python:
>
> >> > > >>> import sys
> >> > > >>> print sys.path
>
> >> > > On Jul 9, 9:35 am, Juanjo Conti <[EMAIL PROTECTED]> wrote:
>
> >> > > > How did you exactly install it?
> >> > > > Which folders are in your PYTHONPATH?
>
> >> > > > Juanjo
> >> > > > --
> >> > > > mi blog:http://www.juanjoconti.com.ar
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: "ImportError No module named django"

2008-07-09 Thread Peter Herndon

Yes, the install worked.  If you can import a module without error,
it's installed successfully.

Mostly. ;)  You can also successfully import a module even if it is
not on PYTHON_PATH, if you are in the same directory as the module.

---Peter Herndon


On 7/9/08, MadMax007 <[EMAIL PROTECTED]> wrote:
>
> Thanks for the links I'll check them out
>
> One last question, I re-did the installation for Django using some
> instructions I found on Google. When I open Python now and type:
>
 import.django
 django.VERSION
 (0,96 ) "There's something else after the 0, 96 but I can't remember
 what it is sorry, (I'm writing this post from work)
>
> Does this mean that the install worked this time ?
>
> On Jul 8, 11:04 pm, Julien Phalip <[EMAIL PROTECTED]> wrote:
>> Apparently Django is not present in the PYTHONPATH and therefore not
>> reachable by Python.
>> I'm not a Mac user, but some help can be found on google.
>>
>> Try there for
>> example:http://antoniocangiano.com/2007/12/22/how-to-install-django-with-mysq...http://www.rhonabwy.com/wp/2006/07/20/installing-django-on-macos-x-de...
>>
>> In the first link, the section "Telling Python where Django is" looks
>> like what you're after.
>>
>> Cheers,
>>
>> Julien
>>
>> On Jul 9, 12:34 pm, MadMax007 <[EMAIL PROTECTED]> wrote:
>>
>> > Ok, for the PYTHONPATH I got:
>>
>> > >>> import sys
>> > >>> print sys.path
>>
>> > ['', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
>> > python25.zip', '/System/Library/Frameworks/Python.framework/Versions/
>> > 2.5/lib/python2.5', '/System/Library/Frameworks/Python.framework/
>> > Versions/2.5/lib/python2.5/plat-darwin', '/System/Library/Frameworks/
>> > Python.framework/Versions/2.5/lib/python2.5/plat-mac', '/System/
>> > Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-
>> > mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/
>> > Versions/2.5/Extras/lib/python', '/System/Library/Frameworks/
>> > Python.framework/Versions/2.5/lib/python2.5/lib-tk', '/System/Library/
>> > Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload', '/
>> > Library/Python/2.5/site-packages', '/System/Library/Frameworks/
>> > Python.framework/Versions/2.5/Extras/lib/python/PyObjC']
>>
>> > Hope this tells you something, I relatively new to Apple computers so
>> > I feel a bit lost, and to top things off, I'm new to Python as well :
>> > (
>>
>> > On Jul 8, 5:42 pm, Julien Phalip <[EMAIL PROTECTED]> wrote:
>>
>> > > Hi,
>>
>> > > This means that Django is not in the PYTHONPATH. To check what's in
>> > > that path, run the following in Python:
>>
>> > > >>> import sys
>> > > >>> print sys.path
>>
>> > > On Jul 9, 9:35 am, Juanjo Conti <[EMAIL PROTECTED]> wrote:
>>
>> > > > How did you exactly install it?
>> > > > Which folders are in your PYTHONPATH?
>>
>> > > > Juanjo
>> > > > --
>> > > > mi blog:http://www.juanjoconti.com.ar
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: "ImportError No module named django"

2008-07-09 Thread MadMax007

Thanks for the links I'll check them out

One last question, I re-did the installation for Django using some
instructions I found on Google. When I open Python now and type:

>>> import.django
>>> django.VERSION
>>> (0,96 ) "There's something else after the 0, 96 but I can't remember what 
>>> it is sorry, (I'm writing this post from work)

Does this mean that the install worked this time ?

On Jul 8, 11:04 pm, Julien Phalip <[EMAIL PROTECTED]> wrote:
> Apparently Django is not present in the PYTHONPATH and therefore not
> reachable by Python.
> I'm not a Mac user, but some help can be found on google.
>
> Try there for 
> example:http://antoniocangiano.com/2007/12/22/how-to-install-django-with-mysq...http://www.rhonabwy.com/wp/2006/07/20/installing-django-on-macos-x-de...
>
> In the first link, the section "Telling Python where Django is" looks
> like what you're after.
>
> Cheers,
>
> Julien
>
> On Jul 9, 12:34 pm, MadMax007 <[EMAIL PROTECTED]> wrote:
>
> > Ok, for the PYTHONPATH I got:
>
> > >>> import sys
> > >>> print sys.path
>
> > ['', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
> > python25.zip', '/System/Library/Frameworks/Python.framework/Versions/
> > 2.5/lib/python2.5', '/System/Library/Frameworks/Python.framework/
> > Versions/2.5/lib/python2.5/plat-darwin', '/System/Library/Frameworks/
> > Python.framework/Versions/2.5/lib/python2.5/plat-mac', '/System/
> > Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-
> > mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/
> > Versions/2.5/Extras/lib/python', '/System/Library/Frameworks/
> > Python.framework/Versions/2.5/lib/python2.5/lib-tk', '/System/Library/
> > Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload', '/
> > Library/Python/2.5/site-packages', '/System/Library/Frameworks/
> > Python.framework/Versions/2.5/Extras/lib/python/PyObjC']
>
> > Hope this tells you something, I relatively new to Apple computers so
> > I feel a bit lost, and to top things off, I'm new to Python as well :
> > (
>
> > On Jul 8, 5:42 pm, Julien Phalip <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > This means that Django is not in the PYTHONPATH. To check what's in
> > > that path, run the following in Python:
>
> > > >>> import sys
> > > >>> print sys.path
>
> > > On Jul 9, 9:35 am, Juanjo Conti <[EMAIL PROTECTED]> wrote:
>
> > > > How did you exactly install it?
> > > > Which folders are in your PYTHONPATH?
>
> > > > Juanjo
> > > > --
> > > > mi blog:http://www.juanjoconti.com.ar
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: "ImportError No module named django"

2008-07-08 Thread Julien Phalip

Apparently Django is not present in the PYTHONPATH and therefore not
reachable by Python.
I'm not a Mac user, but some help can be found on google.

Try there for example:
http://antoniocangiano.com/2007/12/22/how-to-install-django-with-mysql-on-mac-os-x/
http://www.rhonabwy.com/wp/2006/07/20/installing-django-on-macos-x-development-version/

In the first link, the section "Telling Python where Django is" looks
like what you're after.

Cheers,

Julien

On Jul 9, 12:34 pm, MadMax007 <[EMAIL PROTECTED]> wrote:
> Ok, for the PYTHONPATH I got:
>
> >>> import sys
> >>> print sys.path
>
> ['', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python25.zip', '/System/Library/Frameworks/Python.framework/Versions/
> 2.5/lib/python2.5', '/System/Library/Frameworks/Python.framework/
> Versions/2.5/lib/python2.5/plat-darwin', '/System/Library/Frameworks/
> Python.framework/Versions/2.5/lib/python2.5/plat-mac', '/System/
> Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-
> mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/
> Versions/2.5/Extras/lib/python', '/System/Library/Frameworks/
> Python.framework/Versions/2.5/lib/python2.5/lib-tk', '/System/Library/
> Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload', '/
> Library/Python/2.5/site-packages', '/System/Library/Frameworks/
> Python.framework/Versions/2.5/Extras/lib/python/PyObjC']
>
>
>
> Hope this tells you something, I relatively new to Apple computers so
> I feel a bit lost, and to top things off, I'm new to Python as well :
> (
>
> On Jul 8, 5:42 pm, Julien Phalip <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > This means that Django is not in the PYTHONPATH. To check what's in
> > that path, run the following in Python:
>
> > >>> import sys
> > >>> print sys.path
>
> > On Jul 9, 9:35 am, Juanjo Conti <[EMAIL PROTECTED]> wrote:
>
> > > How did you exactly install it?
> > > Which folders are in your PYTHONPATH?
>
> > > Juanjo
> > > --
> > > mi blog:http://www.juanjoconti.com.ar
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: "ImportError No module named django"

2008-07-08 Thread MadMax007

Ok, for the PYTHONPATH I got:

>>> import sys
>>> print sys.path
['', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python25.zip', '/System/Library/Frameworks/Python.framework/Versions/
2.5/lib/python2.5', '/System/Library/Frameworks/Python.framework/
Versions/2.5/lib/python2.5/plat-darwin', '/System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/plat-mac', '/System/
Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-
mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/
Versions/2.5/Extras/lib/python', '/System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/lib-tk', '/System/Library/
Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload', '/
Library/Python/2.5/site-packages', '/System/Library/Frameworks/
Python.framework/Versions/2.5/Extras/lib/python/PyObjC']
>>>

Hope this tells you something, I relatively new to Apple computers so
I feel a bit lost, and to top things off, I'm new to Python as well :
(

On Jul 8, 5:42 pm, Julien Phalip <[EMAIL PROTECTED]> wrote:
> Hi,
>
> This means that Django is not in the PYTHONPATH. To check what's in
> that path, run the following in Python:
>
> >>> import sys
> >>> print sys.path
>
> On Jul 9, 9:35 am, Juanjo Conti <[EMAIL PROTECTED]> wrote:
>
> > How did you exactly install it?
> > Which folders are in your PYTHONPATH?
>
> > Juanjo
> > --
> > mi blog:http://www.juanjoconti.com.ar
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: "ImportError No module named django"

2008-07-08 Thread Julien Phalip

Hi,

This means that Django is not in the PYTHONPATH. To check what's in
that path, run the following in Python:

>>> import sys
>>> print sys.path


On Jul 9, 9:35 am, Juanjo Conti <[EMAIL PROTECTED]> wrote:
> How did you exactly install it?
> Which folders are in your PYTHONPATH?
>
> Juanjo
> --
> mi blog:http://www.juanjoconti.com.ar
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: "ImportError No module named django"

2008-07-08 Thread Juanjo Conti

How did you exactly install it?
Which folders are in your PYTHONPATH?

Juanjo
-- 
mi blog: http://www.juanjoconti.com.ar

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



"ImportError No module named django"

2008-07-08 Thread MadMax007

I installed Django on my iMac running Lepoard. I installed the
official release and followed the instructions, but when I try to
import Django to Python I get the following message:

 "ImportError No module named django" on top of this, I now have 2
Python folders version 2.5.

Has anyone come up with a fix for this?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



"ImportError: No module named django" error from SELinux permissions on RHEL5 fixed.

2008-01-16 Thread Scott

Awesome, Karen, that was it! Thank you so much. Here's the fix for you
RHEL5 (Red Hat Enterprise Linux 5 | RHEL 5) users.

My working directory and subdirectories needed SELinux permission to
be used by apache/httpd so I ran this command:

[root]# chcon -R -t httpd_user_content_t /Working

See my solution reference here:
http://docs.fedoraproject.org/selinux-faq-fc3/index.html#id2825658

Thank you again to all that offered aid.

Scott


On Jan 16, 10:39 am, Scott <[EMAIL PROTECTED]> wrote:
> @Graham:
> It looks like it is a working django load. Also, the permissions are
> the same as when they were able to load while in the python site
> packages folder.
> ---
> Python 2.4.3 (#1, Dec 11 2006, 11:38:52)
> [GCC 4.1.1 20061130 (Red Hat 4.1.1-43)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.>>> 
> import django
> >>> print django.__file__
>
> /Working/django/django/__init__.pyc
>
> ---
>
> @Marty:
> Here is the path to my django __init__.pyc file as output above in the
> test requested by Graham: /Working/django/django/__init__.pyc
>
> @Karen:
> This sounds promising I'm digging into that and will post my findings.
>
> Thank you for your responses, kind folks.
>
> Scott
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: "ImportError: No module named django" persists...

2008-01-16 Thread Scott

@Graham:
It looks like it is a working django load. Also, the permissions are
the same as when they were able to load while in the python site
packages folder.
---
Python 2.4.3 (#1, Dec 11 2006, 11:38:52)
[GCC 4.1.1 20061130 (Red Hat 4.1.1-43)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> print django.__file__
/Working/django/django/__init__.pyc
>>>
---


@Marty:
Here is the path to my django __init__.pyc file as output above in the
test requested by Graham: /Working/django/django/__init__.pyc


@Karen:
This sounds promising I'm digging into that and will post my findings.

Thank you for your responses, kind folks.

Scott
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: "ImportError: No module named django" persists...

2008-01-16 Thread Marty Alchin

On Jan 15, 2008 9:48 PM, Scott <[EMAIL PROTECTED]> wrote:
> /Working/django

Out of curiosity, what are the contents of this directory? Is this the
root of the django distribution (containing things like 'docs',
'tests' and another 'django' directory), or is this the django code
itself (containing things like 'core', 'db' and 'contrib')?

If it's the latter, that'll definitely cause you problems, since
Python only sees the *contents* of the directory, so you'd never be
able to "import django" in this manner. If that's the case, try just
using "/Working" and see if that helps. If it's the former, and it
does have a second "django" directory inside it, I don't know what to
suggest.

-Gul

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: "ImportError: No module named django" persists...

2008-01-16 Thread Karen Tracey
On Jan 15, 2008 6:55 PM, Scott <[EMAIL PROTECTED]> wrote:

> MY SYSTEM:
>
> OS = { Red Hat Enterprise Linux 5 | RHEL 5 | RHEL5 }
> Python 2.4.3 (#1, Dec 11 2006, 11:38:52)
> Apache/2.2.3 (Red Hat) Server
> mod_python.version '3.2.8'
> Django VERSION = (0, 97, 'pre')
>

>From all the information you've posted it really seems like the apache
process cannot access files under /Working, whereas it can access files
under site-packages.  This despite the fact that the file permissions under
/Working look like they should allow access by apache.  So what could be
going on?  I've never used RHEL5, but I've read some about it and it
includes SELinux (security-enhanced Linux).  Could this be getting in the
way?  This page:

http://www.linuxtopia.org/online_books/rhel5/rhel5_administration/rhel5_sec-sel-admincontrol.html

list some commands to show the status of SELinux.  If you try them on your
system and it's enabled/enforcing and restricting access to /Working, then
that could explain the weird behavior you have described.  Fixing it would
then require either disabling SELinux or changing the config to remove the
restrictions on apache's access to /Working.

Karen

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: "ImportError: No module named django" persists...

2008-01-15 Thread Graham Dumpleton

First verify Django is being picked up from where you think it is by
doing:

  import django
  print django.__file__

Second, ensure that the installed Django files have permissions that
would allow user that Apache may be running as to access it. That is,
if Apache is running as a service and the Django files are only
readable by you, it will not be able to load them.

Graham

On Jan 16, 1:48 pm, Scott <[EMAIL PROTECTED]> wrote:
> 1234,
>
> Yes, with these directives:
>
> 
> 
>     SetHandler python-program
>     PythonPath "['/Working/django','/Working/modules','/Working/
> projects','/Working/projects/mysite'] + sys.path"
>     SetEnv DJANGO_SETTINGS_MODULE mysite.settings
>     PythonHandlermod_python.testhandler
>     #PythonHandler django.core.handlers.modpython
>     PythonDebug On
> 
> 
>
> Here's the output for the 'sys.path':
>
> 
> Apache version  Apache/2.2.3 (Red Hat)
> Apache threaded MPM     No (single thread MPM)
> Apache forked MPM       Yes, maximum 256 processes
> Apache server root      /etc/httpd
> Apache document root    /var/www/html
> Apache error log        /etc/httpd/logs/error_log (view last 100 lines)
> Python sys.version      2.4.3 (#1, Dec 11 2006, 11:38:52) [GCC 4.1.1
> 20061130 (Red Hat 4.1.1-43)]
> Python sys.path =
>
> /Working/django
> /Working/modules
> /Working/projects
> /Working/projects/mysite
> /usr/lib/python24.zip
> /usr/lib/python2.4
> /usr/lib/python2.4/plat-linux2
> /usr/lib/python2.4/lib-tk
> /usr/lib/python2.4/lib-dynload
> /usr/lib/python2.4/site-packages
> /usr/lib/python2.4/site-packages/Numeric
> /usr/lib/python2.4/site-packages/gtk-2.0
>
> Python interpreter name server.mysite.commod_python.publisher available  
> Yesmod_python.psp available        Yes
> -
>
> Any thoughts?
>
> Scott
>
> On Jan 15, 6:39 pm, 1234 <[EMAIL PROTECTED]> wrote:
>
> > django is in your sys.path?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: "ImportError: No module named django" persists...

2008-01-15 Thread Scott

1234,

Yes, with these directives:



SetHandler python-program
PythonPath "['/Working/django','/Working/modules','/Working/
projects','/Working/projects/mysite'] + sys.path"
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
PythonHandler mod_python.testhandler
#PythonHandler django.core.handlers.modpython
PythonDebug On




Here's the output for the 'sys.path':


Apache version  Apache/2.2.3 (Red Hat)
Apache threaded MPM No (single thread MPM)
Apache forked MPM   Yes, maximum 256 processes
Apache server root  /etc/httpd
Apache document root/var/www/html
Apache error log/etc/httpd/logs/error_log (view last 100 lines)
Python sys.version  2.4.3 (#1, Dec 11 2006, 11:38:52) [GCC 4.1.1
20061130 (Red Hat 4.1.1-43)]
Python sys.path =

/Working/django
/Working/modules
/Working/projects
/Working/projects/mysite
/usr/lib/python24.zip
/usr/lib/python2.4
/usr/lib/python2.4/plat-linux2
/usr/lib/python2.4/lib-tk
/usr/lib/python2.4/lib-dynload
/usr/lib/python2.4/site-packages
/usr/lib/python2.4/site-packages/Numeric
/usr/lib/python2.4/site-packages/gtk-2.0

Python interpreter name server.mysite.com
mod_python.publisher available  Yes
mod_python.psp availableYes
-

Any thoughts?

Scott

On Jan 15, 6:39 pm, 1234 <[EMAIL PROTECTED]> wrote:
> django is in your sys.path?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: "ImportError: No module named django" persists...

2008-01-15 Thread 1234
django is in your sys.path?

2008/1/16, Scott <[EMAIL PROTECTED]>:
>
>
> Thank you to anyone who may be of help...
>
> PROBLEM:
>
> ImportError: No module named django
>
> MY SETTINGS:
>
> /Working/django/django/__init__.py   (file exists)
> /Working/projects/  (my main project
> folder)
> /Working/projects/mysite('mysite' project folder)
> /usr/lib/python2.4/site-packages(my python packages folder)
> (Permissions are 755 with owner:group = root:root)
>
> httpd.conf directives are...
>
> 
> SetHandler python-program
> PythonPath "['/Working/django','/Working/modules','/Working/
> projects','/Working/projects/mysite'] + sys.path"
> SetEnv DJANGO_SETTINGS_MODULE mysite.settings
> #  PythonHandler mod_python.testhandler
> PythonHandler django.core.handlers.modpython
> PythonDebug On
> 
>
> OTHER CLUES:
>
> - Django imports just fine from command line python call with
> $PYTHONPATH exported to same directories as location directive.
> - If I put my django folder in /usr/lib/python2.4/site-packages/ it
> works.
> - A sym link from /Working/django/django to /usr/lib/python2.4/site-
> packages/django does not work.
> - Reference by PythonPath directive also is failing.
> - Viewing testhandler output shows that my /Working/* directories are
> getting into sys.path alright.
>
> MY SYSTEM:
>
> OS = { Red Hat Enterprise Linux 5 | RHEL 5 | RHEL5 }
> Python 2.4.3 (#1, Dec 11 2006, 11:38:52)
> Apache/2.2.3 (Red Hat) Server
> mod_python.version '3.2.8'
> Django VERSION = (0, 97, 'pre')
>
>
> Thank you for looking.
>
> Scott
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



"ImportError: No module named django" persists...

2008-01-15 Thread Scott

Thank you to anyone who may be of help...

PROBLEM:

ImportError: No module named django

MY SETTINGS:

/Working/django/django/__init__.py   (file exists)
/Working/projects/  (my main project
folder)
/Working/projects/mysite('mysite' project folder)
/usr/lib/python2.4/site-packages(my python packages folder)
(Permissions are 755 with owner:group = root:root)

httpd.conf directives are...


SetHandler python-program
PythonPath "['/Working/django','/Working/modules','/Working/
projects','/Working/projects/mysite'] + sys.path"
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
#  PythonHandler mod_python.testhandler
PythonHandler django.core.handlers.modpython
PythonDebug On


OTHER CLUES:

- Django imports just fine from command line python call with
$PYTHONPATH exported to same directories as location directive.
- If I put my django folder in /usr/lib/python2.4/site-packages/ it
works.
- A sym link from /Working/django/django to /usr/lib/python2.4/site-
packages/django does not work.
- Reference by PythonPath directive also is failing.
- Viewing testhandler output shows that my /Working/* directories are
getting into sys.path alright.

MY SYSTEM:

OS = { Red Hat Enterprise Linux 5 | RHEL 5 | RHEL5 }
Python 2.4.3 (#1, Dec 11 2006, 11:38:52)
Apache/2.2.3 (Red Hat) Server
mod_python.version '3.2.8'
Django VERSION = (0, 97, 'pre')


Thank you for looking.

Scott

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ImportError: no module named django

2007-04-18 Thread Oliver Charles

Ok, I took the last email private with Rob, and got it sorted! It
seemed that apache couldn't access any files in /home/acid2, so the
solution has been to move everything into /opt/django, so I did:

sudo mv /home/acid2/src/django_src/ /opt/django/src/
sudo rm /usr/lib/python2.4/site-packages/django
sudo ln -s /opt/django_src/django /usr/lib/python2.4/site-packages/
django

Also, I store my projects and their templates in /opt/django_projects
and /opt/django_templates, respectivly.

Quick hint that i'll pass on from Rob (that I'm sure many people know)
- settings.py contains sensitive information, so I have made this
private with:
chmod 0750 /whatever/settings.py
chown root:apache /whatever/settings.py

Now it's read/write/execute for root, and only read/execute for
apache.


Hurrah! Big thanks to Rob for helping me get this fixed!

- Oliver Charles

On Apr 18, 10:10 pm, Oliver Charles <[EMAIL PROTECTED]> wrote:
> I get...
>
> [EMAIL PROTECTED] ~]$ sudo -u apache python
> Password:
> Python 2.4.3 (#1, Mar 14 2007, 18:51:08)
> [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.>>> 
> import django
>
> Traceback (most recent call last):
>   File "", line 1, in ?
> ImportError: No module named django>>> import sys
> >>> sys.path
>
> ['', '/usr/lib/python24.zip', '/usr/lib/python2.4', '/usr/lib/
> python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', '/usr/lib/
> python2.4/lib-dynload', '/usr/lib/python2.4/site-packages']
>
> So this is the problem I guess - apache can't access django, but I'm
> not sure why... any ideas?
>
> oggie rob: Nah, I'm not discouraged, I really like there attidue...
> linux isn't my forte though it seems!
>
> --
> Ollie
>
> On Apr 18, 10:05 pm, oggie rob <[EMAIL PROTECTED]> wrote:
>
> > What happens when you run:
> > sudo -u apache python>>> import django
> > >>> django
>
> >  > __init__.pyc'>
>
> > BTW, I use openhosting and have a few django sites running so don't be
> > discouraged!
>
> >  -rob
>
> > On Apr 18, 12:59 pm, Oliver Charles <[EMAIL PROTECTED]> wrote:
>
> > > Ok,
>
> > > I've done a ton of googling on this, and not come up with much luck.
> > > Here's my situation:
>
> > > I've just purchased a new VPS from OpenHosting for a project, and it
> > > comes with mod_python, apache2 and postgresql all setup. So I did a
> > > subversion checkout of django, and symlinked it to /usr/lib/python2.4/
> > > site-packages, which I can verify:
>
> > > [EMAIL PROTECTED] ~]$ ls -al /usr/lib/python2.4/site-packages/ | grep
> > > django
> > > lrwxrwxrwx  1 root root 33 Apr 18 14:27 django -> /home/acid2/src/
> > > django_src/django
>
> > > So that looks ok, and just to make sure, here's django_src/django:
>
> > > [EMAIL PROTECTED] ~]$ ls -al ~/src/django_src/ | grep django
> > > drwxr-xr-x 20 acid2 acid2 4096 Apr 18 14:27 django
>
> > > So, with django now symlinked to my site-packages, I tried importing
> > > it in the python shell:
>
> > > [EMAIL PROTECTED] ~]$ python
> > > Python 2.4.3 (#1, Mar 14 2007, 18:51:08)
> > > [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
> > > Type "help", "copyright", "credits" or "license" for more information.
>
> > > >>> import django
>
> > > Looks good! So I now went to add this into my Apache config:
>
> > > 
> > > SetHandler python-program
> > > PythonHandler django.core.handlers.modpython
> > > #SetEnv DJANGO_SETTINGS_MODULE trainspotted.settings
> > > PythonDebug On
> > > PythonPath "sys.path"
> > > 
>
> > > Of course, now when I go to my apache site I get:
>
> > > Mod_python error: "PythonHandler django.core.handlers.modpython"
>
> > > Traceback (most recent call last):
> > > 
>
> > > ImportError: No module named django
>
> > > I can't see for the life of me why this is happening. Django is
> > > readable everywhere, python can import is from the shell, and sys.path
> > > contains a django directory, with __init__.py...
>
> > > Can anyone see why I can't get the import to work? I'm banging my head
> > > on this one!
>
> > > ---
> > > Oliver Charles


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ImportError: no module named django

2007-04-18 Thread ashwoods

maybe apache or apache mod_python is set not to follow symlinks. copy
the django code into site-packages (not merely a symlink) and try if
that works.

On Apr 18, 11:10 pm, Oliver Charles <[EMAIL PROTECTED]> wrote:
> I get...
>
> [EMAIL PROTECTED] ~]$ sudo -u apache python
> Password:
> Python 2.4.3 (#1, Mar 14 2007, 18:51:08)
> [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.>>> 
> import django
>
> Traceback (most recent call last):
>   File "", line 1, in ?
> ImportError: No module named django>>> import sys
> >>> sys.path
>
> ['', '/usr/lib/python24.zip', '/usr/lib/python2.4', '/usr/lib/
> python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', '/usr/lib/
> python2.4/lib-dynload', '/usr/lib/python2.4/site-packages']
>
> So this is the problem I guess - apache can't access django, but I'm
> not sure why... any ideas?
>
> oggie rob: Nah, I'm not discouraged, I really like there attidue...
> linux isn't my forte though it seems!
>
> --
> Ollie
>
> On Apr 18, 10:05 pm, oggie rob <[EMAIL PROTECTED]> wrote:
>
> > What happens when you run:
> > sudo -u apache python>>> import django
> > >>> django
>
> >  > __init__.pyc'>
>
> > BTW, I use openhosting and have a few django sites running so don't be
> > discouraged!
>
> >  -rob
>
> > On Apr 18, 12:59 pm, Oliver Charles <[EMAIL PROTECTED]> wrote:
>
> > > Ok,
>
> > > I've done a ton of googling on this, and not come up with much luck.
> > > Here's my situation:
>
> > > I've just purchased a new VPS from OpenHosting for a project, and it
> > > comes with mod_python, apache2 and postgresql all setup. So I did a
> > > subversion checkout of django, and symlinked it to /usr/lib/python2.4/
> > > site-packages, which I can verify:
>
> > > [EMAIL PROTECTED] ~]$ ls -al /usr/lib/python2.4/site-packages/ | grep
> > > django
> > > lrwxrwxrwx  1 root root 33 Apr 18 14:27 django -> /home/acid2/src/
> > > django_src/django
>
> > > So that looks ok, and just to make sure, here's django_src/django:
>
> > > [EMAIL PROTECTED] ~]$ ls -al ~/src/django_src/ | grep django
> > > drwxr-xr-x 20 acid2 acid2 4096 Apr 18 14:27 django
>
> > > So, with django now symlinked to my site-packages, I tried importing
> > > it in the python shell:
>
> > > [EMAIL PROTECTED] ~]$ python
> > > Python 2.4.3 (#1, Mar 14 2007, 18:51:08)
> > > [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
> > > Type "help", "copyright", "credits" or "license" for more information.
>
> > > >>> import django
>
> > > Looks good! So I now went to add this into my Apache config:
>
> > > 
> > > SetHandler python-program
> > > PythonHandler django.core.handlers.modpython
> > > #SetEnv DJANGO_SETTINGS_MODULE trainspotted.settings
> > > PythonDebug On
> > > PythonPath "sys.path"
> > > 
>
> > > Of course, now when I go to my apache site I get:
>
> > > Mod_python error: "PythonHandler django.core.handlers.modpython"
>
> > > Traceback (most recent call last):
> > > 
>
> > > ImportError: No module named django
>
> > > I can't see for the life of me why this is happening. Django is
> > > readable everywhere, python can import is from the shell, and sys.path
> > > contains a django directory, with __init__.py...
>
> > > Can anyone see why I can't get the import to work? I'm banging my head
> > > on this one!
>
> > > ---
> > > Oliver Charles


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ImportError: no module named django

2007-04-18 Thread oggie rob

Okay, you're getting much closer. Try 'sudo -u apache ls -l /usr/lib/
python2.4/site-packages/' and 'site-packages/django' to look at
permissions.

On Apr 18, 2:10 pm, Oliver Charles <[EMAIL PROTECTED]> wrote:
> I get...
>
> [EMAIL PROTECTED] ~]$ sudo -u apache python
> Password:
> Python 2.4.3 (#1, Mar 14 2007, 18:51:08)
> [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.>>> 
> import django
>
> Traceback (most recent call last):
>   File "", line 1, in ?
> ImportError: No module named django>>> import sys
> >>> sys.path
>
> ['', '/usr/lib/python24.zip', '/usr/lib/python2.4', '/usr/lib/
> python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', '/usr/lib/
> python2.4/lib-dynload', '/usr/lib/python2.4/site-packages']
>
> So this is the problem I guess - apache can't access django, but I'm
> not sure why... any ideas?
>
> oggie rob: Nah, I'm not discouraged, I really like there attidue...
> linux isn't my forte though it seems!
>
> --
> Ollie
>
> On Apr 18, 10:05 pm, oggie rob <[EMAIL PROTECTED]> wrote:
>
> > What happens when you run:
> > sudo -u apache python>>> import django
> > >>> django
>
> >  > __init__.pyc'>
>
> > BTW, I use openhosting and have a few django sites running so don't be
> > discouraged!
>
> >  -rob
>
> > On Apr 18, 12:59 pm, Oliver Charles <[EMAIL PROTECTED]> wrote:
>
> > > Ok,
>
> > > I've done a ton of googling on this, and not come up with much luck.
> > > Here's my situation:
>
> > > I've just purchased a new VPS from OpenHosting for a project, and it
> > > comes with mod_python, apache2 and postgresql all setup. So I did a
> > > subversion checkout of django, and symlinked it to /usr/lib/python2.4/
> > > site-packages, which I can verify:
>
> > > [EMAIL PROTECTED] ~]$ ls -al /usr/lib/python2.4/site-packages/ | grep
> > > django
> > > lrwxrwxrwx  1 root root 33 Apr 18 14:27 django -> /home/acid2/src/
> > > django_src/django
>
> > > So that looks ok, and just to make sure, here's django_src/django:
>
> > > [EMAIL PROTECTED] ~]$ ls -al ~/src/django_src/ | grep django
> > > drwxr-xr-x 20 acid2 acid2 4096 Apr 18 14:27 django
>
> > > So, with django now symlinked to my site-packages, I tried importing
> > > it in the python shell:
>
> > > [EMAIL PROTECTED] ~]$ python
> > > Python 2.4.3 (#1, Mar 14 2007, 18:51:08)
> > > [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
> > > Type "help", "copyright", "credits" or "license" for more information.
>
> > > >>> import django
>
> > > Looks good! So I now went to add this into my Apache config:
>
> > > 
> > > SetHandler python-program
> > > PythonHandler django.core.handlers.modpython
> > > #SetEnv DJANGO_SETTINGS_MODULE trainspotted.settings
> > > PythonDebug On
> > > PythonPath "sys.path"
> > > 
>
> > > Of course, now when I go to my apache site I get:
>
> > > Mod_python error: "PythonHandler django.core.handlers.modpython"
>
> > > Traceback (most recent call last):
> > > 
>
> > > ImportError: No module named django
>
> > > I can't see for the life of me why this is happening. Django is
> > > readable everywhere, python can import is from the shell, and sys.path
> > > contains a django directory, with __init__.py...
>
> > > Can anyone see why I can't get the import to work? I'm banging my head
> > > on this one!
>
> > > ---
> > > Oliver Charles


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ImportError: no module named django

2007-04-18 Thread Oliver Charles

I get...

[EMAIL PROTECTED] ~]$ sudo -u apache python
Password:
Python 2.4.3 (#1, Mar 14 2007, 18:51:08)
[GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
Traceback (most recent call last):
  File "", line 1, in ?
ImportError: No module named django
>>> import sys
>>> sys.path
['', '/usr/lib/python24.zip', '/usr/lib/python2.4', '/usr/lib/
python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', '/usr/lib/
python2.4/lib-dynload', '/usr/lib/python2.4/site-packages']

So this is the problem I guess - apache can't access django, but I'm
not sure why... any ideas?

oggie rob: Nah, I'm not discouraged, I really like there attidue...
linux isn't my forte though it seems!

--
Ollie


On Apr 18, 10:05 pm, oggie rob <[EMAIL PROTECTED]> wrote:
> What happens when you run:
> sudo -u apache python>>> import django
> >>> django
>
>  __init__.pyc'>
>
> BTW, I use openhosting and have a few django sites running so don't be
> discouraged!
>
>  -rob
>
> On Apr 18, 12:59 pm, Oliver Charles <[EMAIL PROTECTED]> wrote:
>
> > Ok,
>
> > I've done a ton of googling on this, and not come up with much luck.
> > Here's my situation:
>
> > I've just purchased a new VPS from OpenHosting for a project, and it
> > comes with mod_python, apache2 and postgresql all setup. So I did a
> > subversion checkout of django, and symlinked it to /usr/lib/python2.4/
> > site-packages, which I can verify:
>
> > [EMAIL PROTECTED] ~]$ ls -al /usr/lib/python2.4/site-packages/ | grep
> > django
> > lrwxrwxrwx  1 root root 33 Apr 18 14:27 django -> /home/acid2/src/
> > django_src/django
>
> > So that looks ok, and just to make sure, here's django_src/django:
>
> > [EMAIL PROTECTED] ~]$ ls -al ~/src/django_src/ | grep django
> > drwxr-xr-x 20 acid2 acid2 4096 Apr 18 14:27 django
>
> > So, with django now symlinked to my site-packages, I tried importing
> > it in the python shell:
>
> > [EMAIL PROTECTED] ~]$ python
> > Python 2.4.3 (#1, Mar 14 2007, 18:51:08)
> > [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
>
> > >>> import django
>
> > Looks good! So I now went to add this into my Apache config:
>
> > 
> > SetHandler python-program
> >     PythonHandler django.core.handlers.modpython
> > #SetEnv DJANGO_SETTINGS_MODULE trainspotted.settings
> > PythonDebug On
> > PythonPath "sys.path"
> > 
>
> > Of course, now when I go to my apache site I get:
>
> > Mod_python error: "PythonHandler django.core.handlers.modpython"
>
> > Traceback (most recent call last):
> > 
>
> > ImportError: No module named django
>
> > I can't see for the life of me why this is happening. Django is
> > readable everywhere, python can import is from the shell, and sys.path
> > contains a django directory, with __init__.py...
>
> > Can anyone see why I can't get the import to work? I'm banging my head
> > on this one!
>
> > ---
> > Oliver Charles


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ImportError: no module named django

2007-04-18 Thread oggie rob

What happens when you run:
sudo -u apache python
>>> import django
>>> django


BTW, I use openhosting and have a few django sites running so don't be
discouraged!

 -rob

On Apr 18, 12:59 pm, Oliver Charles <[EMAIL PROTECTED]> wrote:
> Ok,
>
> I've done a ton of googling on this, and not come up with much luck.
> Here's my situation:
>
> I've just purchased a new VPS from OpenHosting for a project, and it
> comes with mod_python, apache2 and postgresql all setup. So I did a
> subversion checkout of django, and symlinked it to /usr/lib/python2.4/
> site-packages, which I can verify:
>
> [EMAIL PROTECTED] ~]$ ls -al /usr/lib/python2.4/site-packages/ | grep
> django
> lrwxrwxrwx  1 root root 33 Apr 18 14:27 django -> /home/acid2/src/
> django_src/django
>
> So that looks ok, and just to make sure, here's django_src/django:
>
> [EMAIL PROTECTED] ~]$ ls -al ~/src/django_src/ | grep django
> drwxr-xr-x 20 acid2 acid2 4096 Apr 18 14:27 django
>
> So, with django now symlinked to my site-packages, I tried importing
> it in the python shell:
>
> [EMAIL PROTECTED] ~]$ python
> Python 2.4.3 (#1, Mar 14 2007, 18:51:08)
> [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
> >>> import django
>
> Looks good! So I now went to add this into my Apache config:
>
> 
> SetHandler python-program
> PythonHandler django.core.handlers.modpython
> #SetEnv DJANGO_SETTINGS_MODULE trainspotted.settings
> PythonDebug On
> PythonPath "sys.path"
> 
>
> Of course, now when I go to my apache site I get:
>
> Mod_python error: "PythonHandler django.core.handlers.modpython"
>
> Traceback (most recent call last):
> 
>
> ImportError: No module named django
>
> I can't see for the life of me why this is happening. Django is
> readable everywhere, python can import is from the shell, and sys.path
> contains a django directory, with __init__.py...
>
> Can anyone see why I can't get the import to work? I'm banging my head
> on this one!
>
> ---
> Oliver Charles


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



ImportError: no module named django

2007-04-18 Thread Oliver Charles

Ok,

I've done a ton of googling on this, and not come up with much luck.
Here's my situation:

I've just purchased a new VPS from OpenHosting for a project, and it
comes with mod_python, apache2 and postgresql all setup. So I did a
subversion checkout of django, and symlinked it to /usr/lib/python2.4/
site-packages, which I can verify:

[EMAIL PROTECTED] ~]$ ls -al /usr/lib/python2.4/site-packages/ | grep
django
lrwxrwxrwx  1 root root 33 Apr 18 14:27 django -> /home/acid2/src/
django_src/django

So that looks ok, and just to make sure, here's django_src/django:

[EMAIL PROTECTED] ~]$ ls -al ~/src/django_src/ | grep django
drwxr-xr-x 20 acid2 acid2 4096 Apr 18 14:27 django


So, with django now symlinked to my site-packages, I tried importing
it in the python shell:

[EMAIL PROTECTED] ~]$ python
Python 2.4.3 (#1, Mar 14 2007, 18:51:08)
[GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>>

Looks good! So I now went to add this into my Apache config:


SetHandler python-program
PythonHandler django.core.handlers.modpython
#SetEnv DJANGO_SETTINGS_MODULE trainspotted.settings
PythonDebug On
PythonPath "sys.path"



Of course, now when I go to my apache site I get:

Mod_python error: "PythonHandler django.core.handlers.modpython"

Traceback (most recent call last):


ImportError: No module named django


I can't see for the life of me why this is happening. Django is
readable everywhere, python can import is from the shell, and sys.path
contains a django directory, with __init__.py...

Can anyone see why I can't get the import to work? I'm banging my head
on this one!

---
Oliver Charles


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ImportError: No module named django

2006-07-17 Thread Malcolm Tredinnick

On Mon, 2006-07-17 at 18:58 -0700, markguy wrote:
> I've got my output at least resembling yours now, thanks to your
> explanation about the difference between URL config and apps.
> 
> I'm using this for urlpatterns:
> ( r'^$' , 'django.views.generic.simple.direct_to_template' , {
> 'template' : 'index.html' } ) ,
> 
> However, there's a new wrinkle. While trying to figure out what I was
> doing/not doing, I wiped the db and rm'd the apps in the project.
> Loading http://127.0.0.1 now says:
> Exception Value:  (1146, "Table 'bbg.django_session' doesn't exist")
> 
> No worries, I thought. I'll just stick a basic app in there and load up
> the tables before carrying on.
> ./manage.py startapp goods
> ./manage.py sql goods
> 
> The second line spits this back:
> django.core.exceptions.ImproperlyConfigured: App with label goods could
> not be found
> 
> There is, to be clear, a /goods directory with all expected files
> sitting in it.

Hint: is it also in your INSTALLED_APPS list? 

Also, you will need to run syncdb again, because the database is telling
you that (not surprisingly) you also nuked a bunch of tables for
Django's other applications (in this case, the Session middleware).

Malcolm



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: ImportError: No module named django

2006-07-17 Thread markguy

Okay, ./manage.py syncdb before ./manage.py sql goods is apparently a
good idea.

So, I've now got a very basic index page loading up as expected.

I'm off for a couple drinks to see if I can wrap my head around how
Django compartmentalizes things and then will endeavor to not bring
many more problems to your attention.

Thanks very much for all the assistance!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: ImportError: No module named django

2006-07-17 Thread markguy

I've got my output at least resembling yours now, thanks to your
explanation about the difference between URL config and apps.

I'm using this for urlpatterns:
( r'^$' , 'django.views.generic.simple.direct_to_template' , {
'template' : 'index.html' } ) ,

However, there's a new wrinkle. While trying to figure out what I was
doing/not doing, I wiped the db and rm'd the apps in the project.
Loading http://127.0.0.1 now says:
Exception Value:(1146, "Table 'bbg.django_session' doesn't exist")

No worries, I thought. I'll just stick a basic app in there and load up
the tables before carrying on.
./manage.py startapp goods
./manage.py sql goods

The second line spits this back:
django.core.exceptions.ImproperlyConfigured: App with label goods could
not be found

There is, to be clear, a /goods directory with all expected files
sitting in it.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: ImportError: No module named django

2006-07-17 Thread Malcolm Tredinnick

On Mon, 2006-07-17 at 08:22 -0700, markguy wrote:
> Changing bbg.goods to bbg.goods.url throws the same exception as
> bbg.goods.

So inside your project directory, try something like the following (I am
pasting a terminal session using one of my own projects just to show
what sort of output I see):

.-([EMAIL PROTECTED] 10:40:16) ~/Programming/website
`--> ./manage.py shell

Python 2.4.3 (#1, Jun 13 2006, 11:46:22)
[GCC 4.1.1 20060525 (Red Hat 4.1.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)

>>> from weblog import urls

>>> urls.urlpatterns
[,
,
,
,
,
,
,
]

>>> dir(urls)
['__builtins__', '__doc__', '__file__', '__name__', 'feeds',
'handler404', 'handler500', 'include', 'patterns', 'urlpatterns']

>>>

In this example, my main urls.py file has an include('weblog.urls') line
and the above example shows that I can import weblog.urls correctly and
access the urlpatterns. I suspect you will see some sort of error there.

Best wishes,
Malcolm


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: ImportError: No module named django

2006-07-17 Thread Malcolm Tredinnick

On Mon, 2006-07-17 at 07:34 -0700, markguy wrote:
> 
> Malcolm Tredinnick wrote:
> 
> > That should be easy enough to diagnose. My initial guess would be that
> > bbg is in django_projects/, rather than django_src/, just from the way
> > you named your directories. Remember that .bash_profile is obviously not
> > going to be run by Apache (it's not bash, after all) and your PYTHONPATH
> > settings there were broader than your mod_python config settings.
> 
> Hrm. bbg is my project and it is in django_projects/ . The tutorial
> suggests you can stick your project directory anywhere you like, with
> the caveat of staying out of docroot. That suggests that I've done
> something silly with the httpd.conf. PYTHONPATH has to include
> /django_src. And I just realized I don't ever see where
> /django_projects is made known to the server, which must be what you
> mean by "broader than your mod_python config settings." So, let me
> toddle off and try to change that.
> 
> >
> > >
> > > I'll investigate on my own, but thanks for editorial wizardry! :)
> > >
> > > re: import django: Yes, it returns literally nothing. I was trying to
> > > establish that I could load django in the shell at least.
> > >
> > > The bbg/urls.py looks like this:
> > > urlpatterns = patterns('',
> > >   ( r'^admin/' , include( 'django.contrib.admin.urls' ) ) ,
> > >   ( r'' , include( 'bbg.goods' ) ) ,
> > > )
> > >
> > > I was trying to tie /bbg to the top level. Is there a better, official
> > > way to do this?
> >
> > I have many questions at this point. Firstly, is it correct to assume
> > your project is called bbg/ ? So bbg.urls is the value of the
> > ROOT_URLCONF setting in your appropriate settings.py?
> 
> Yes, /bbg is project. ROOT_URLCONF = 'bbg.urls', yes.
> 
> > If so, the "include ('bbg.goods')" line looks suspicious. Is "goods.py"
> > a URL configuration file? Or did you mean that to be bbg.goods.url?
> 
> Huh. I was following the example in the tutorial, so while I *thought*
> I meant to use bbg.goods, it may very well be I was mistaken. Tutorial
> shows:
> 
> INSTALLED_APPS = (
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.sites',
> 'mysite.polls'
> )
> 

The tutorial does indeed say that, for INSTALLED_APPS. But you are
working on your URL configuration, which has nothing to do with this
section. The above are import paths under which Django will look to
import models. The include(...) paths in the URL configuration are
modules to import inside which Django will look for a urlpatterns
variable. They are different.

The examples in [1] might be more useful for you to use as a reference.

[1] http://www.djangoproject.com/documentation/url_dispatch/#id1

Regards,
Malcolm




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: ImportError: No module named django

2006-07-17 Thread markguy

So, what you were *really* suggesting was that PYTHONPATH should
include the project directory, not the django_src directory? I saw that
while skimming through the docs.

I changed PYTHONPATH to reflect that (apparently, adding both
directories in a fit of crankiness doesn't help matters):

PythonPath  "[ '/home/mark/django_projects' ] + sys.path"

Viewing http://127.0.0.1/ now shows:

Mod_python error: "PythonHandler django.core.handlers.modpython"

Traceback (most recent call last):

  File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line
287, in HandlerDispatch
log=debug)

  File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line
454, in import_module
f, p, d = imp.find_module(parts[i], path)

ImportError: No module named django

That suggests that mod_python has lost sight of django. So, clearly I
don't understand how to  setup httpd.conf. :|


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: ImportError: No module named django

2006-07-17 Thread markguy


Malcolm Tredinnick wrote:

> That should be easy enough to diagnose. My initial guess would be that
> bbg is in django_projects/, rather than django_src/, just from the way
> you named your directories. Remember that .bash_profile is obviously not
> going to be run by Apache (it's not bash, after all) and your PYTHONPATH
> settings there were broader than your mod_python config settings.

Hrm. bbg is my project and it is in django_projects/ . The tutorial
suggests you can stick your project directory anywhere you like, with
the caveat of staying out of docroot. That suggests that I've done
something silly with the httpd.conf. PYTHONPATH has to include
/django_src. And I just realized I don't ever see where
/django_projects is made known to the server, which must be what you
mean by "broader than your mod_python config settings." So, let me
toddle off and try to change that.

>
> >
> > I'll investigate on my own, but thanks for editorial wizardry! :)
> >
> > re: import django: Yes, it returns literally nothing. I was trying to
> > establish that I could load django in the shell at least.
> >
> > The bbg/urls.py looks like this:
> > urlpatterns = patterns('',
> > ( r'^admin/' , include( 'django.contrib.admin.urls' ) ) ,
> > ( r'' , include( 'bbg.goods' ) ) ,
> > )
> >
> > I was trying to tie /bbg to the top level. Is there a better, official
> > way to do this?
>
> I have many questions at this point. Firstly, is it correct to assume
> your project is called bbg/ ? So bbg.urls is the value of the
> ROOT_URLCONF setting in your appropriate settings.py?

Yes, /bbg is project. ROOT_URLCONF = 'bbg.urls', yes.

> If so, the "include ('bbg.goods')" line looks suspicious. Is "goods.py"
> a URL configuration file? Or did you mean that to be bbg.goods.url?

Huh. I was following the example in the tutorial, so while I *thought*
I meant to use bbg.goods, it may very well be I was mistaken. Tutorial
shows:

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'mysite.polls'
)


> The previous error you posted was saying there was something wrong with
> the construction of your root URL conf (bbg/urls.py, presumably), so
> investigate that file carefully. For example, comment out both lines:
> does runserver start? Can you view http://localhost:8000/ (it will give
> you a pretty error page)? No uncomment the admin line. Rinse, wash,
> repeat.

Commenting both out netted me the "Congrats, it worked" page. Re-adding
the admin spit a 404 back for / and the admin login for /admin.
Commenting admin out and re-adding bbg gives me the same AttributeError
exception. Interestingly, /admin still shows a login, although when I
log in, it dumps the same AttributeError exception.

Once again, thanks for your help!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: ImportError: No module named django

2006-07-17 Thread Malcolm Tredinnick

On Mon, 2006-07-17 at 04:43 -0700, markguy wrote:
> I'm covering all the bases. Or trying to.
> 
> re: django_source: Wow. Uh, thanks. I have no idea why I typed that out
> fully in httpd.conf. Fixing that leads to a new error:
> 
> EnvironmentError: Could not import settings 'bbg.settings' (Is it on
> sys.path? Does it have syntax errors?): No module named bbg.settings

That should be easy enough to diagnose. My initial guess would be that
bbg is in django_projects/, rather than django_src/, just from the way
you named your directories. Remember that .bash_profile is obviously not
going to be run by Apache (it's not bash, after all) and your PYTHONPATH
settings there were broader than your mod_python config settings.

> 
> I'll investigate on my own, but thanks for editorial wizardry! :)
> 
> re: import django: Yes, it returns literally nothing. I was trying to
> establish that I could load django in the shell at least.
> 
> The bbg/urls.py looks like this:
> urlpatterns = patterns('',
>   ( r'^admin/' , include( 'django.contrib.admin.urls' ) ) ,
>   ( r'' , include( 'bbg.goods' ) ) ,
> )
> 
> I was trying to tie /bbg to the top level. Is there a better, official
> way to do this?

I have many questions at this point. Firstly, is it correct to assume
your project is called bbg/ ? So bbg.urls is the value of the
ROOT_URLCONF setting in your appropriate settings.py?

If so, the "include ('bbg.goods')" line looks suspicious. Is "goods.py"
a URL configuration file? Or did you mean that to be bbg.goods.url?

The previous error you posted was saying there was something wrong with
the construction of your root URL conf (bbg/urls.py, presumably), so
investigate that file carefully. For example, comment out both lines:
does runserver start? Can you view http://localhost:8000/ (it will give
you a pretty error page)? No uncomment the admin line. Rinse, wash,
repeat.

Regards,
Malcolm


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: ImportError: No module named django

2006-07-17 Thread markguy

I'm covering all the bases. Or trying to.

re: django_source: Wow. Uh, thanks. I have no idea why I typed that out
fully in httpd.conf. Fixing that leads to a new error:

EnvironmentError: Could not import settings 'bbg.settings' (Is it on
sys.path? Does it have syntax errors?): No module named bbg.settings

I'll investigate on my own, but thanks for editorial wizardry! :)

re: import django: Yes, it returns literally nothing. I was trying to
establish that I could load django in the shell at least.

The bbg/urls.py looks like this:
urlpatterns = patterns('',
( r'^admin/' , include( 'django.contrib.admin.urls' ) ) ,
( r'' , include( 'bbg.goods' ) ) ,
)

I was trying to tie /bbg to the top level. Is there a better, official
way to do this?

Thanks for the help!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: ImportError: No module named django

2006-07-17 Thread Malcolm Tredinnick

On Mon, 2006-07-17 at 03:57 -0700, markguy wrote:
> I have poked around looking for an answer to this and none of the
> suggestions/fixes I found did the trick.
> 
> Ubuntu 6.06/Python
> 2.4.3/Apache2.0.55/mod_python3.1.4/mySQL5.0.22/Django0.95
> 
> Relevant bits to follow
> httpd.conf:
> 
>   SetHandler  mod_python
>   PythonHandler   django.core.handlers.modpython
>   SetEnv  DJANGO_SETTINGS_MODULE  bbg.settings
>   PythonPath  "['/home/mark/django_source/'] + sys.path"
>   PythonDebug On
> 

This isn't relevant for anything you subsequently posted. Are you just
covering all bases or are you trying to work out a mod_python problem? 

Also, if you have cut-and-pasted here, then you have spelt the final
directory "django_source" in the above, but "django_src" everywhere else
in your email. You'd be amazed at how much that sort of typo can screw
up your day.

> .bash_profile (although weirdly, I have to source this after I boot up
> the box to be able to get them to echo):
> export PATH=$PATH:$HOME/django_src/django/bin
> export PYTHONPATH=$PYTHONPATH:$HOME/django_src:$HOME/django_projects
> 
> python shell:
> >>import sys
> >>sys.path
> 
> returns:
> ['', '/etc/apache2', '/home/mark/django_src',
> '/home/mark/django_projects', '/usr/lib/python24.zip',
> '/usr/lib/python2.4', '/usr/lib/python2.4/plat-linux2',
> '/usr/lib/python2.4/lib-tk', '/usr/lib/python2.4/lib-dynload',
> '/usr/local/lib/python2.4/site-packages',
> '/usr/lib/python2.4/site-packages',
> '/usr/lib/python2.4/site-packages/HTMLgen',
> '/usr/lib/python2.4/site-packages/Numeric',
> '/usr/lib/python2.4/site-packages/PIL',
> '/usr/lib/python2.4/site-packages/cairo',
> '/usr/lib/python2.4/site-packages/gst-0.10',
> '/usr/lib/python2.4/site-packages/gtk-2.0']
> 
> >>import django
> returns nothing.

Do you mean it literally returns nothing, or it returns an error? If it
returns nothing that means it worked.

> 
> I can run the server from ./manage.py runserver ... err, actually, I
> can't. I could last night!
> Request URL:  http://127.0.0.1:8000/
> Exception Type:   AttributeError
> Exception Value:  'module' object has no attribute 'urlpatterns'
> Exception Location:   /home/mark/django_src/django/core/urlresolvers.py
> in resolve, line 145

It sounds like your URL configuration file is missing the "urlpatterns"
variable. Is your urls.py file correctly set up?

If your problem is just the final exception, check your URL
configuration. If that isn't the only problem you're seeing, can you
clarify?

Regards,
Malcolm


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: ImportError: No module named django

2006-06-30 Thread Jeroen Ruigrok van der Werven

On 6/30/06, Craig Marshall <[EMAIL PROTECTED]> wrote:
> I can
> import django at the python prompt, but running syncdb gives me the
> ImportError.

What does python -v manage.py yield? 't Will be a long output.
Probably best to put it up on a URL if you can.

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: ImportError: No module named django

2006-06-30 Thread Craig Marshall

> I'd advise you to drop the symlink and use the PYTHONPATH variable,
> but that's just my hunch based on no empirical data.

Okay, I just deleted /usr/lib/python2.4/site-packages/django (which
was the symlink), and added to the PYTHONPATH environment variable the
actual django directory, and if failed to import django at the python
prompt, so I changed the env-var to point to the parent of the django
directory, and I now have the same problem I had to start with. I can
import django at the python prompt, but running syncdb gives me the
ImportError.

Craig

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: ImportError: No module named django

2006-06-30 Thread Craig Marshall

> This is very strangely worded. You installed Ubuntu completely on top
> of Debian and then installed Django from SVN again? You're not being
> explicit enough.

Sorry for being unclear. I had debian sarge installed, and I installed
django from svn at that point. Then I wiped my machine entirely,
installed ubuntu, and installed the exact same svn version of django I
previously downloaded (I'm working in a team, and we're trying to use
the same version of django.).

> In your site-packages directory (typically something like
> /usr/local/lib/python24/site-packages), do you have anything
> resembling Django (egg or directory)?

Only the symlink I made called "django" which points to the actual
django dir in my $HOME

I also symlinked /usr/bin/django-admin.py into the
.../site-packages/django/bin/django-admin.py file.

> Jeroen Ruigrok van der Werven

Thanks for your help.

Craig

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: ImportError: No module named django

2006-06-30 Thread Jeroen Ruigrok van der Werven

On 6/28/06, Craig Marshall <[EMAIL PROTECTED]> wrote:
> I downloaded the svn version of django a couple of weeks ago, and had
> it working fine within Debian. I installed Ubuntu 6.06 today, and my
> django install has stopped working.

This is very strangely worded. You installed Ubuntu completely on top
of Debian and then installed Django from SVN again? You're not being
explicit enough.

> I can run python interactively and type "import django" and get no
> errors, but when I go into our project directory and run "./manage.py
> syncdb",  I get this error:
>
> ImportError: No module named django

In your site-packages directory (typically something like
/usr/local/lib/python24/site-packages), do you have anything
resembling Django (egg or directory)?

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: ImportError: No module named django

2006-06-30 Thread Craig Marshall

> I downloaded the svn version of django a couple of weeks ago, and had
> it working fine within Debian. I installed Ubuntu 6.06 today, and my
> django install has stopped working.
>
> I can run python interactively and type "import django" and get no
> errors, but when I go into our project directory and run "./manage.py
> syncdb",  I get this error:
>
> ImportError: No module named django

Is this the best place to ask this kind of question, or would I be
better off trying irc or something else?

Thanks,
Craig

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: ImportError: No module named django

2006-06-28 Thread Craig Marshall

> It sounds like you might have two versions of Python installed. You
> should confirm that the shebang line in ./manage.py is for the right
> version. Alternatively, running 'python manage.py syncdb' should work.

The shebang says "#!/usr/bin/env python", which returns 2.4.3 when
asked. (So does "`which python` -V" and "python -V", in case that
sheds any light?)

Running "python manage.py syncdb" gives me exactly the same error as
"./manage.py syncdb".

Typing "pyt" only gives my "python" and "python2.4", the former
being a symlink to the latter, so I don't think I have a different
version installed anywhere. There's probably a better way to check
this though.

I'm really not sure what to try next. I guess the last resort is to go
back to debian, but I quite like the easy interface of ubuntu, so ..
hum.

Craig

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



ImportError: No module named django

2006-06-28 Thread Craig Marshall

Hi,

I downloaded the svn version of django a couple of weeks ago, and had
it working fine within Debian. I installed Ubuntu 6.06 today, and my
django install has stopped working.

I can run python interactively and type "import django" and get no
errors, but when I go into our project directory and run "./manage.py
syncdb",  I get this error:

ImportError: No module named django

I'm running Python 2.4.3 in case that matters - any ideas?

Thanks,
Craig

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---