when installing process of openerp 6, i want to generate a config file with this command,
cd /home/openerp/openerp-server/bin/
./openerp-server.py -s --stop-after-init -c /home/openerp/openerp-server.cfg
but it was always showed a message
ImportError: No module named psycopg2
when i check for psycopg2 package, it's already installed,
Package python-psycopg2-2.4.5-1.rhel5.x86_64
already installed and latest version
Nothing to do
what's wrong with this? my server is centos, i've installed python 2.6.7.
Really need your help guys..
Step 1: Install the dependencies
Step 2: Then run this command in your virtualenv
ref: Fernando Munoz
try:
run python and try to import if you insist on installing it on your systems python try:
For Python3
Step 1: Install Dependencies
Step 2: Install
Please try to run the command
import psycopg2
on the python console. If you get the error then check thesys.path
where the python look for the install module. If the parent directory of thepython-psycopg2-2.4.5-1.rhel5.x86_64
is there in thesys.path
or not. If its not in thesys.path
then runexport PYTHONPATH=<parent directory of python-psycopg2-2.4.5-1.rhel5.x86_64>
before running the openerp server.You need to install the
psycopg2
module.On CentOS: Make sure Python 2.7+ is installed. If not, follow these instructions: http://toomuchdata.com/2014/02/16/how-to-install-python-on-centos/
Even though this is a CentOS question, here are the instructions for Ubuntu:
Cite: http://initd.org/psycopg/install/
Recently faced this issue on my production server. I had installed pyscopg2 using
It worked beautifully on my local, but had me for a run on my ec2 server.
The above command worked for me there. Posting here just in case it would help someone in future.