Re: sqlite3 problems setting up

2009-01-25 Thread Steve Holden

DragonSlayre wrote:
> 
> 
> On Jan 25, 6:04 pm, Steve Holden  wrote:
>> When you install something by running
>>
>>   python setup.py install
>>
>> it gets installed into the python that is used to run setup.py. It looks
>> like you had /usr/local/bin on your path when you installed django, but
>> not when you installed PIL and pysqlite2 (or maybe you just hadn't
>> installed Python 2.6 at that stage).
>>
>> Either way, one version of Python won't see packages installed in another.
> 
> 
> Yes, I think this is happening - very frustrating!  I just wanted to
> update python - Whenever I try install modules now though (e.g. sudo
> aptitude install python-imaging), it doesn't install them in the new
> folder  - why oh why
> 
> I just found this site 
> http://jaredforsyth.com/content/install-python-26-ubuntu
> that explains how to have an automatic install - which I did,  but now
> my python path has got my other python 2.6 installation location. (I
> now have one under /usr/lib/ and another under /usr/local/lib)
> 
> I've googled and googled and have not found out how you remove it
> properly (If I were to remove it, I'd just delete the whole folder)
> 
> I don't know how to set my python path to point to the new python 2.6
> folder either.
> 
Don't forget that you have to set not only your own path but also the
sudo path, to make sure that /usr/local/bin is in the same place
relative to /usr/bin in them both. If /usr/bin comes first then "python"
will mean python 2.5, otherwise 2.6.
> 
> All in all, I'd rather just revert back to python 2.5 problem is
> that I don't know how to do that either!!!

You'll need to remove not only /usr/local/lib/python2.6, but also the
appropriate binary files in /usr/local/bin. I believe those are the only
two places affected by a local install.

regards
 Steve
-- 
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/

--~--~-~--~~~---~--~~
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: sqlite3 problems setting up

2009-01-24 Thread DragonSlayre



On Jan 25, 6:04 pm, Steve Holden  wrote:
>
> When you install something by running
>
>   python setup.py install
>
> it gets installed into the python that is used to run setup.py. It looks
> like you had /usr/local/bin on your path when you installed django, but
> not when you installed PIL and pysqlite2 (or maybe you just hadn't
> installed Python 2.6 at that stage).
>
> Either way, one version of Python won't see packages installed in another.


Yes, I think this is happening - very frustrating!  I just wanted to
update python - Whenever I try install modules now though (e.g. sudo
aptitude install python-imaging), it doesn't install them in the new
folder  - why oh why

I just found this site http://jaredforsyth.com/content/install-python-26-ubuntu
that explains how to have an automatic install - which I did,  but now
my python path has got my other python 2.6 installation location. (I
now have one under /usr/lib/ and another under /usr/local/lib)

I've googled and googled and have not found out how you remove it
properly (If I were to remove it, I'd just delete the whole folder)

I don't know how to set my python path to point to the new python 2.6
folder either.


All in all, I'd rather just revert back to python 2.5 problem is
that I don't know how to do that either!!!
--~--~-~--~~~---~--~~
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: sqlite3 problems setting up

2009-01-24 Thread Steve Holden

DragonSlayre wrote:
> Just doing some exploring - noticing that:
> 
> * /usr/lib/python2.5/site-packages has a pysqlite2 folder as well as a
> PIL folder
> * /usr/local/lib/python2.6/site-packages has just django in it
> 
> I'm not sure how the whole site-packages things work, or why python
> 2.5 is in /usr/lib/ and python 2.6 is in /usr/local/lib/ ?

Sounds like Python 2.5 came with your Unix/Linux distro, and you have
added 2.6 by installing from source - by default it installs with
--prefix=/usr/local, I believe.

When you install something by running

  python setup.py install

it gets installed into the python that is used to run setup.py. It looks
like you had /usr/local/bin on your path when you installed django, but
not when you installed PIL and pysqlite2 (or maybe you just hadn't
installed Python 2.6 at that stage).

Either way, one version of Python won't see packages installed in another.

regards
 Steve
-- 
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/

--~--~-~--~~~---~--~~
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: sqlite3 problems setting up

2009-01-24 Thread DragonSlayre

Just doing some exploring - noticing that:

* /usr/lib/python2.5/site-packages has a pysqlite2 folder as well as a
PIL folder
* /usr/local/lib/python2.6/site-packages has just django in it

I'm not sure how the whole site-packages things work, or why python
2.5 is in /usr/lib/ and python 2.6 is in /usr/local/lib/ ?
--~--~-~--~~~---~--~~
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: sqlite3 problems setting up

2009-01-24 Thread DragonSlayre

Importing sqlite3 fails as well (if I type this into a python
shell)

 import sqlite3
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python2.6/sqlite3/__init__.py", line 24, in

from dbapi2 import *
  File "/usr/local/lib/python2.6/sqlite3/dbapi2.py", line 27, in

from _sqlite3 import *
ImportError: No module named _sqlite3

sqlite3 is definitely installed, as I made a database and tested it
out
--~--~-~--~~~---~--~~
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: sqlite3 problems setting up

2009-01-24 Thread DragonSlayre

This is my path currently:

['', '/usr/local/lib/python26.zip', '/usr/local/lib/python2.6', '/usr/
local/lib/python2.6/plat-linux2', '/usr/local/lib/python2.6/lib-tk', '/
usr/local/lib/python2.6/lib-old', '/usr/local/lib/python2.6/lib-
dynload', '/usr/local/lib/python2.6/site-packages']


On Jan 25, 3:22 pm, DragonSlayre  wrote:
> I've just done a fresh install of python 2.6 and django 1.0.2, and
> sqlite3 in ubuntu, and I've cloned my repository, and tried python
> manage.py runserver, but then I get this error:
>
> File "/usr/local/lib/python2.6/site-packages/django/db/backends/
> sqlite3/base.py", line 27, in 
>     raise ImproperlyConfigured, "Error loading %s module: %s" %
> (module, exc)
> django.core.exceptions.ImproperlyConfigured: Error loading sqlite3
> module: No module named _sqlite3
>
> The only thing I can think of is that maybe what it's looking for
> isn't on the python path or something - I just commented out the DB in
> the settings, and it complained about the PIL module (I installed this
> prior to installing django).
>
> I'm not exactly sure what's going on, any help would be appreciated :)
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---