Python newbie here - I've been replacing our awk & ksh scripts for reports with it. I liked the Django demo on Windows so much that I volunteered to implement our tiny website using Django on RHEL AS5 Linux boxes.<br>
<br>Now I'm running into trouble getting Python, Django, & SQLite working on RHEL AS5. I don't really require compiling from source, but I did so to get the latest versions (& I thought Python > 2.5 came with SQLite already installed). <br>
<br>What am I missing in the installs below? The Django "manage.py syncdb" gets error "No module named _sqlite3". <br><br>Does Django installation require more than the link to Python-2.7/lib/python2.7/site-packages?<br>
<br><font size="2"><span style="font-family: courier new,monospace;">$ tar xf Python-2.7.tgz #Install Python 2.7</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$ cd Python-2.7</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">$ mkdir /apps/Python-2.7</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$ chown simonst /apps/Python-2.7</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">$ ./configure --prefix=/apps/Python-2.7</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$ make</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">$ sudo make install</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$ export PATH=/apps/Python-2.7/bin:$PATH</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">$ python -V</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Python 2.7</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$ tar xzf sqlite-amalgamation-3.7.0.1.tar.gz #Install sqlite 3.7.0.1</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">$ cd sqlite-3.7.0.1</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$ ./configure --prefix=/apps/sqlite-3.7.0</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">$ make</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$ sudo make install</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">$ export PATH=/apps/sqlite-3.7.0/bin:$PATH</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$ sqlite3 -version</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">3.7.0.1</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$ sudo tar xzf Django-1.2.1.tar.gz -C /apps #Install Django 1.2.1</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">$ cd /apps/Django-1.2.1</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$ sudo ln -s /apps/Django-1.2.1/django /apps/Python-2.7/lib/python2.7/site-packages</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">$ export PATH=/apps/Django-1.2.1/django/bin:$PATH</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$ django-admin.py --version</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">1.2.1</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> (see attachment for more detail)</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$ django-admin.py startproject mysite #Start Django project</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$ cd mysite</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">$ ./manage.py runserver #Show Django dev server is ok</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$ ./manage.py startapp blog #Start Django Blog app</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">$ vi blog/models.py</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$ vi settings.py</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$ ./manage.py syncdb #Build database</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Traceback (most recent call last):</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> File "./manage.py", line 11, in <module></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> . . . . .</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> File "/apps/Python-2.7/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 34, in <module></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> raise ImproperlyConfigured("Error loading %s: %s" % (module, exc))</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">django.core.exceptions.ImproperlyConfigured: Error loading either pysqlite2 or sqlite3 modules (tried in that order): No module named _sqlite3</span><br style="font-family: courier new,monospace;">
</font><br>