PDA

View Full Version : [ubuntu] Installing python2.5 on Maverick



vivek40
October 13th, 2010, 04:08 AM
Hii I wanted to install python2.5.4 on my system and went about compling from source like this.
1.I downloaded Python-2.5.4.tgz.tar from the python site.


cd Downloadstar -xvzf Python-2.5.4.tgz.tar cd Python-2.5.4
./configure --prefix=/usr/local/python2.5.4
make
make test
sudo make install
sudo ln -s /usr/local/python2.5.4/bin/python /usr/bin/python2.5.4
However after installing it, when I try using it , I get the below error:-
File "/home/vivek/google_appengine/google/appengine/datastore/datastore_sqlite_stub.py", line 52, in <module>
import sqlite3
File "/usr/local/python2.5.4/lib/python2.5/sqlite3/__init__.py", line 24, in <module>
from dbapi2 import *
File "/usr/local/python2.5.4/lib/python2.5/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ImportError: No module named _sqlite3



How do I get to solve this.Would Python not come bundled with sqlite3. Need someone to help me here please!

marcello.nuccio
November 8th, 2010, 09:52 AM
You can use the packages in
https://launchpad.net/~fkrull/+archive/deadsnakes (https://launchpad.net/%7Efkrull/+archive/deadsnakes)
available for Lucid and Maverick releases.

godspeedmav
November 8th, 2010, 02:49 PM
Hii I wanted to install python2.5.4 on my system and went about compling from source like this.
1.I downloaded Python-2.5.4.tgz.tar from the python site.


cd Downloadstar -xvzf Python-2.5.4.tgz.tar cd Python-2.5.4
./configure --prefix=/usr/local/python2.5.4
make
make test
sudo make install
sudo ln -s /usr/local/python2.5.4/bin/python /usr/bin/python2.5.4
However after installing it, when I try using it , I get the below error:-
File "/home/vivek/google_appengine/google/appengine/datastore/datastore_sqlite_stub.py", line 52, in <module>
import sqlite3
File "/usr/local/python2.5.4/lib/python2.5/sqlite3/__init__.py", line 24, in <module>
from dbapi2 import *
File "/usr/local/python2.5.4/lib/python2.5/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ImportError: No module named _sqlite3



How do I get to solve this.Would Python not come bundled with sqlite3. Need someone to help me here please!



According to this post: http://stackoverflow.com/questions/1210664/no-module-named-sqlite3 on stackoverflow.com, it is very similar to your problem. it says here that the user installed libsqlite3-dev from synaptic package manager, and recompiled python2.5 or as in your case python2.5.4. If you want to compile yourself, try this one or use the tip above. :)