Re: ImproperlyConfigured: Error loading psycopg2 module: No module named _psycopg

2014-01-17 Thread Начаров Михаил

You're welcome!

You can also take a look to another python web-server.
Especially if you want to have for example two sites with different 
version of python on the same server.

When I wrote my first django-app on py3, I faced the same problem.


17.01.2014 15:34, Timothy W. Cook пишет:




On Fri, Jan 17, 2014 at 1:52 AM, Начаров Михаил 
> wrote:


Hi Timothy,

Note that your mod_wsgi module compiled for using python2.7. So
what you need now is install(compile) mod_wsgi for python3
instead of the same module compiled for python2.7.
On Debian you can do it by this command:
$ sudo apt-get install libapache2-mod-wsgi-py3


Thanks,  After some poking around, I did find that this was the 
problem.  Now, recompiling it on CentOS (with Python 3 as an alternate 
install) was quite another trick.  :-)


Thanks.



--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/52D9027B.4060304%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: ImproperlyConfigured: Error loading psycopg2 module: No module named _psycopg

2014-01-17 Thread Timothy W. Cook
On Fri, Jan 17, 2014 at 1:52 AM, Начаров Михаил
wrote:

>  Hi Timothy,
>
> Note that your mod_wsgi module compiled for using python2.7. So what you
> need now is install(compile) mod_wsgi for python3 instead of the
> same module compiled for python2.7.
> On Debian you can do it by this command:
> $ sudo apt-get install libapache2-mod-wsgi-py3
>
>
> Thanks,  After some poking around, I did find that this was the problem.
 Now, recompiling it on CentOS (with Python 3 as an alternate install) was
quite another trick.  :-)

Thanks.


>
> 16.01.2014 16:34, Timothy W. Cook пишет:
>
> This question is also on Stackoverflow http://goo.gl/LinMue  but I
> thought somene here may have an idea.
>
>
>   I have a Django 1.5, Python 2.7 site running under Apache with mod_wsgi
> on a CentOS 6.4 server.
>
> I have rebuilt this site using Django 1.6 and Python 3.3. Deploying it to
> the same server and changing the paths in httpd.conf I get the subject
> error. This new install works as expected using ./manage.py runserver.
>
> Here are the two WSGI definitions from httpd.conf:
>
> WSGIScriptAlias / /home/ccdgen/CCDGEN2/apache/wsgi.py
> WSGIPythonPath 
> /home/ccdgen/CCDGEN2/ccdgen/ccdgen:/home/ccdgen/CCDGEN2/ccdgen:/home/ccdgen/CCDGEN2/lib/python3.3/site-packages  /home/ccdgen/CCDGEN2/ccdgen>
>
>  Order allow,deny
>  Allow from all
>
> #WSGIScriptAlias /ccdgen /home/ccdgen/CCDGEN/apache/wsgi.py#WSGIPythonPath 
> /home/ccdgen/CCDGEN/mlhim/ccdgen:/home/ccdgen/CCDGEN/mlhim:/home/ccdgen/CCDGEN/lib/python2.7/site-pa
> ckages##   # Order 
> allow,deny# Allow from all#   #
>
>  The wsgi.py file is the same on both installations:
>
> import os
> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mlhim.settings")from 
> django.core.wsgi import get_wsgi_application
> application = get_wsgi_application()
>
>
>
> --
>
>  Thanks in advance for any ideas.
>
>  Cheers,
>  Tim
>
>
>  --
> MLHIM VIP Signup: http://goo.gl/22B0U
> 
> Timothy Cook, MSc   +55 21 94711995
> MLHIM http://www.mlhim.org
> Like Us on FB: https://www.facebook.com/mlhim2
> Circle us on G+: http://goo.gl/44EV5
> Google Scholar: http://goo.gl/MMZ1o
> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
>   --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3XNi7-FGOCPnKS%2Bb6%3D-ueWbPMOWFXfOce663fn0YpjWwQ%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/52D8A90F.3040209%40gmail.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
MLHIM VIP Signup: http://goo.gl/22B0U

Timothy Cook, MSc   +55 21 94711995
MLHIM http://www.mlhim.org
Like Us on FB: https://www.facebook.com/mlhim2
Circle us on G+: http://goo.gl/44EV5
Google Scholar: http://goo.gl/MMZ1o
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3UYB-V37doGX%2B8GSY%3DN_ZOSAkPKbUHhwLvm0kBbxYd4%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: ImproperlyConfigured: Error loading psycopg2 module: No module named _psycopg

2014-01-16 Thread Начаров Михаил

Hi Timothy,

Note that your mod_wsgi module compiled for using python2.7. So what you 
need now is install(compile) mod_wsgi for python3 instead of the 
same module compiled for python2.7.

On Debian you can do it by this command:
$ sudo apt-get install libapache2-mod-wsgi-py3



16.01.2014 16:34, Timothy W. Cook пишет:
This question is also on Stackoverflow http://goo.gl/LinMue  but I 
thought somene here may have an idea.



I have a Django 1.5, Python 2.7 site running under Apache with 
mod_wsgi on a CentOS 6.4 server.


I have rebuilt this site using Django 1.6 and Python 3.3. Deploying it 
to the same server and changing the paths in httpd.conf I get the 
subject error. This new install works as expected using ./manage.py 
runserver.


Here are the two WSGI definitions from httpd.conf:

|WSGIScriptAlias/  /home/ccdgen/CCDGEN2/apache/wsgi.py
WSGIPythonPath/home/ccdgen/CCDGEN2/ccdgen/ccdgen:/home/ccdgen/CCDGEN2/ccdgen:/home/ccdgen/CCDGEN2/lib/python3.3/site-packages


  Order  allow,deny
  Allowfrom  all



#WSGIScriptAlias/ccdgen/home/ccdgen/CCDGEN/apache/wsgi.py
#WSGIPythonPath/home/ccdgen/CCDGEN/mlhim/ccdgen:/home/ccdgen/CCDGEN/mlhim:/home/ccdgen/CCDGEN/lib/python2.7/site-packages
#
#
#  Order  allow,deny
#  Allowfrom  all
#
#|

The wsgi.py file is the same on both installations:

|import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE",  "mlhim.settings")
from  django.core.wsgi import get_wsgi_application
application=  get_wsgi_application()|

--

Thanks in advance for any ideas.

Cheers,
Tim


--
MLHIM VIP Signup: http://goo.gl/22B0U

Timothy Cook, MSc   +55 21 94711995
MLHIM http://www.mlhim.org
Like Us on FB: https://www.facebook.com/mlhim2
Circle us on G+: http://goo.gl/44EV5
Google Scholar: http://goo.gl/MMZ1o
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
--
You received this message because you are subscribed to the Google 
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-users+unsubscr...@googlegroups.com.

To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3XNi7-FGOCPnKS%2Bb6%3D-ueWbPMOWFXfOce663fn0YpjWwQ%40mail.gmail.com.

For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/52D8A90F.3040209%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


ImproperlyConfigured: Error loading psycopg2 module: No module named _psycopg

2014-01-16 Thread Timothy W. Cook
This question is also on Stackoverflow http://goo.gl/LinMue  but I thought
somene here may have an idea.


I have a Django 1.5, Python 2.7 site running under Apache with mod_wsgi on
a CentOS 6.4 server.

I have rebuilt this site using Django 1.6 and Python 3.3. Deploying it to
the same server and changing the paths in httpd.conf I get the subject
error. This new install works as expected using ./manage.py runserver.

Here are the two WSGI definitions from httpd.conf:

WSGIScriptAlias / /home/ccdgen/CCDGEN2/apache/wsgi.py
WSGIPythonPath
/home/ccdgen/CCDGEN2/ccdgen/ccdgen:/home/ccdgen/CCDGEN2/ccdgen:/home/ccdgen/CCDGEN2/lib/python3.3/site-packages
   
 Order allow,deny
 Allow from all
   
#WSGIScriptAlias /ccdgen
/home/ccdgen/CCDGEN/apache/wsgi.py#WSGIPythonPath
/home/ccdgen/CCDGEN/mlhim/ccdgen:/home/ccdgen/CCDGEN/mlhim:/home/ccdgen/CCDGEN/lib/python2.7/site-packages##   # Order allow,deny#
  Allow from all#   #

The wsgi.py file is the same on both installations:

import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mlhim.settings")from
django.core.wsgi import get_wsgi_application
application = get_wsgi_application()


--

Thanks in advance for any ideas.

Cheers,
Tim


-- 
MLHIM VIP Signup: http://goo.gl/22B0U

Timothy Cook, MSc   +55 21 94711995
MLHIM http://www.mlhim.org
Like Us on FB: https://www.facebook.com/mlhim2
Circle us on G+: http://goo.gl/44EV5
Google Scholar: http://goo.gl/MMZ1o
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3XNi7-FGOCPnKS%2Bb6%3D-ueWbPMOWFXfOce663fn0YpjWwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.