python - Invalid syntax with conditional expressions -
it's started installing new python version, 2.7.5. error when wsgi runs django's wsgi.py file:
[tue sep 03 23:25:42 2013] [error] [client xxx.xxx.xxx.xxx] mod_wsgi (pid=4710): target wsgi script '/var/www/empirik/data/www/mysite.com/my_project/wsgi.py' cannot loaded python module. [tue sep 03 23:25:42 2013] [error] [client xxx.xxx.xxx.xxx] mod_wsgi (pid=4710): exception occurred processing wsgi script '/var/www/empirik/data/www/mysite.com/my_project/wsgi.py'. [tue sep 03 23:25:42 2013] [error] traceback (most recent call last): [tue sep 03 23:25:42 2013] [error] file "/var/www/empirik/data/www/mysite.com/my_project/wsgi.py", line 22, in ? [tue sep 03 23:25:42 2013] [error] import os [tue sep 03 23:25:42 2013] [error] file "/home/envs/my_project/lib/python2.7/os.py", line 49, in ? [tue sep 03 23:25:42 2013] [error] import posixpath path [tue sep 03 23:25:42 2013] [error] file "/home/envs/my_project/lib/python2.7/posixpath.py", line 324 [tue sep 03 23:25:42 2013] [error] slash, dot = (u'/', u'.') if isinstance(path, _unicode) else ('/', '.') [tue sep 03 23:25:42 2013] [error] ^ [tue sep 03 23:25:42 2013] [error] syntaxerror: invalid syntax
i use virtualenv , can't figure out why happens. have python 2.4.3 installed on machine it's not associated "python" alias , there's python 2.7.5 in virtualenv.
update: ok, i've raised exception in wsgi.py see sys.path uses , it's python2.4:
['/home/envs/my_env/lib/python24.zip', '/home/envs/my_env/lib/python2.4/', '/home/envs/my_env/lib/python2.4/plat-linux2', '/home/envs/my_env/lib/python2.4/lib-tk', '/home/envs/my_env/lib/python2.4/lib-dynload']
i don't understand why , how can change python2.7.
it appear mod_wsgi compiled , uses python 2.4. cannot take mod_wsgi built 1 python version , force use runtime installation different version. go check state of mod_wsgi , compiled for.
Comments
Post a Comment