Hi guys, thank you sincerely for your feedback. As far as I know there is just the one instance of python installed:
" >>> print sys.path ['', '/usr/lib/python2.4/site-packages/PIL-1.1.7-py2.4-linux-i686.egg', '/usr/lib/python2.4/site-packages/sorl_thumbnail-11.12-py2.4.egg', '/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'] [root@svr-h001463 hayley]# whereis python python: /usr/bin/python /usr/bin/python2.4 /usr/lib/python2.4 /usr/include/python2.4 /usr/share/man/man1/python.1.gz [root@svr-h001463 hayley]# cd /usr/lib [root@svr-h001463 lib]# ls -d */ | grep "py" pygtk/ python2.4/ " If I try 'python manage.py shell': " [root@svr-h001463 hayley]# python manage.py shell Traceback (most recent call last): File "manage.py", line 11, in ? execute_manager(settings) File "/usr/lib/python2.4/site-packages/django/core/management/__init__.py", line 301, in execute_manager utility.execute() File "/usr/lib/python2.4/site-packages/django/core/management/__init__.py", line 248, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/lib/python2.4/site-packages/django/core/management/base.py", line 77, in run_from_argv self.execute(*args, **options.__dict__) File "/usr/lib/python2.4/site-packages/django/core/management/base.py", line 86, in execute translation.activate('en-us') File "/usr/lib/python2.4/site-packages/django/utils/translation/__init__.py", line 73, in activate return real_activate(language) File "/usr/lib/python2.4/site-packages/django/utils/translation/__init__.py", line 43, in delayed_loader return g['real_%s' % caller](*args, **kwargs) File "/usr/lib/python2.4/site-packages/django/utils/translation/trans_real.py", line 220, in activate _active[currentThread()] = translation(language) File "/usr/lib/python2.4/site-packages/django/utils/translation/trans_real.py", line 209, in translation default_translation = _fetch(settings.LANGUAGE_CODE) File "/usr/lib/python2.4/site-packages/django/utils/translation/trans_real.py", line 192, in _fetch app = getattr(__import__(appname[:p], {}, {}, [appname[p+1:]]), appname[p+1:]) File "/usr/lib/python2.4/site-packages/sorl_thumbnail-11.12-py2.4.egg/sorl/thumbnail/__init__.py", line 1, in ? from sorl.thumbnail.fields import ImageField File "/usr/lib/python2.4/site-packages/sorl_thumbnail-11.12-py2.4.egg/sorl/thumbnail/fields.py", line 61 with open(data.temporary_file_path(), 'rb') as fp: ^ SyntaxError: invalid syntax " It's going to take me a while to understand all that. This is likely the first time I've had to dig around python. I'll follow up on your suggestions, but in the meantime, if any of the above throws any more light on the issue from your perspective, further comments would be appreciated :) Thank you! Elliot On Wednesday, October 3, 2012 2:56:46 PM UTC+1, ke1g wrote: > > 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....@hayley-group.com<javascript:>> > 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 view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Pe87o1sLPq4J. 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.