A bit of generic advice:

Be sure that you know which python is running your stuff: mod_wsgi,
and IIRC mod_python (if the site really uses it) are bound to a
specific python interpreter.  It may or may not be the one where you
installed sorl-thumbnail.  One question is whether the:

    python manage.py shell

will start.  If that works, runserver (the development server will
probably work (I'm guessing that you've been testing via Apache).  If
so, then use the shell to pretty print sys.path, to find out where
that configuration is finding stuff:

    from pprint import pprint
    import sys
    pprint(sys.path)

You can also write a trivial WSGI "application" (it's just a function)
that creates a text/plain response giving the same information for
that environment.  You can also capture sys.version to confirm that
both pythons are, say, a 2.7.x or not.

If both pythons are compatible versions (not, say, a 2.6 and a 2.7),
you may be able to fix things with the python-path argument to the
WSGIDaemonProcess directive (specific to the daemon process group) or
more globally by using a WSGIPythonHome or WSGIPythonPath directive.
But it is also possible to install stuff in the python that mod_wsgi
is using be default, and to arrange for any manage.py actions you need
to run with that python.

Bill

On Wed, Oct 3, 2012 at 7:51 AM, Elliot <elliot.john...@hayley-group.com> wrote:
> Hi all,
>
> I would like some help or advice migrating an old Django project to a
> different platform.
>
> Firstly, I am ok-ish with linux (mainly CentOS), and created basic websites,
> MySQL/PHP/HTML intranets, but know next to nothing about Django or CMS
> systems in general, so I appreciate that this is quite a challenge for me!
>
> So, I have access to a Ubuntu 11 box which is currently hosting a Django
> v0.97 site. I need to move this site to a CentOS5 (Python v2.4.3) box. There
> isn't really anything to upset on the CentOS box so I am clear to uninstall
> and shuffle stuff around. I have ran a full 'yum update' on CentOS.
>
> I have obviously started by transferring the ubuntu:/var/www/hayley folder
> to centos:/var/www/hayley and setting up Apache.
>
> Googling has had me ensure the following are installed:
> yum install gcc gcc-c++
> yum install zlib-devel
> yum install subversion
> yum install MySQL-python python-devel
> yum install mod_python
> yum install httpd-devel
> yum install memcached
> yum install mysql-server
> yum install python-devel mysql-devel
> yum install python-setuptools
> http://www.psycopg.org/psycopg/tarballs/PSYCOPG-2-4/psycopg2-2.4.5.tar.gz
> http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz
> easy_install PIL
> easy_install sorl-thumbnail
>
> I have ran the installer for Django, found in /var/www/hayley/django-nfa.
>
> I have encountered a tonne of issues so far, which I have been resolving
> with the aid of Google, but I feel I am still a long way off getting this to
> work. In it's current state, if I attempt to access the site, I receive an
> 'internal server error' [500], and my httpd log shows:
> "ImproperlyConfigured: Error while importing URLconf 'hayley.urls': No
> module named sorl"
>
> At this point, I would like to ask:
> 1) Are there are any obvious packages I am missing?
> 2) Even though I believe I have installed sorl-thumbnail, the above error
> obviously indicates an issue. Can someone please suggest where to look in
> order to address it?
> 3) Given this type of migration, is there anything obvious which I need to
> account for?
>
> Thanks all!
>
> Elliot

-- 
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.

Reply via email to