python - mod_wsgi psycopg2 importerror datetime initialization error -


everything runs if use manage.py runserver moment deploy using apache+mod_wsgi

importerror: datetime initialization failed. 

environment details

     centos 6     apache/2.4.6      python 3.5.1 on virtualenv     postgresql-libs-8.4.20-4.el6_7.x86_64 

python modules

django==1.9.1 mod-wsgi==4.4.22 mod-wsgi-httpd==2.4.12.6 psycopg2==2.6.1 wheel==0.26.0 

error log

[wsgi:warn] [pid 7826] mod_wsgi: compiled python/3.5.1. [wsgi:warn] [pid 7826] mod_wsgi: runtime using python/3.5.0. 

virtual host log

     loading wsgi script '/home/mkt/src/market/wsgi.py'.     [wsgi:error] [pid 7828] mod_wsgi (pid=7828): target wsgi script '/home/mkt/src/market/wsgi.py' cannot loaded python module.     [wsgi:error] [pid 7828] mod_wsgi (pid=7828): exception occurred processing wsgi script '/home/mkt/src/market/wsgi.py'.     [wsgi:error] [pid 7828] traceback (most recent call last):     [wsgi:error] [pid 7828]   file "/home/mkt/mktve/lib/python3.5/site-packages/django/db/backends/postgresql/base.py", line 20, in      [wsgi:error] [pid 7828]     import psycopg2 database     [wsgi:error] [pid 7828]   file "/home/mkt/mktve/lib/python3.5/site-packages/psycopg2/__init__.py", line 50, in      [wsgi:error] [pid 7828]     psycopg2._psycopg import binary, number, string, datetime, rowid     [wsgi:error] [pid 7828] importerror: datetime initialization failed     [wsgi:error] [pid 7828]  

apache config alias /static /home/mkt/src/market/static wsgiscriptalias / /home/mkt/src/market/wsgi.py wsgidaemonprocess mysite.com python-path=/home/mkt/src:/home/mkt/mktve/lib/python3.5/site-packages user=myuser group=myuser wsgiprocessgroup mysite.com

<directory /home/mkt/src/market/static>     require granted     #allow </directory> <directory /home/mkt/src/market>     <files wsgi.py>         require granted         #satisfy         #allow     </files> </directory> loglevel info 

ldd

linux-vdso.so.1 =>  (0x00007ffc7bd42000) libpython3.5m.so.1.0 => /usr/lib/libpython3.5m.so.1.0 (0x00007f2e42451000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f2e42234000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f2e4202f000) libutil.so.1 => /lib64/libutil.so.1 (0x00007f2e41e2c000) librt.so.1 => /lib64/librt.so.1 (0x00007f2e41c24000) libm.so.6 => /lib64/libm.so.6 (0x00007f2e4199f000) libc.so.6 => /lib64/libc.so.6 (0x00007f2e4160b000) /lib64/ld-linux-x86-64.so.2 (0x00007f2e42b83000) 

note: i'm guessing problem psycopg2+mod_wsgi because virtualhost on same server running sqlite working fine.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -