pycopg2 build problems

D

devaru

Hi,

I'm trying to install psycopg2 on my system. I followed the
instruction in INSTALL file and gave the command
python setup.py build
running build
running build_py
running build_ext
error: No such file or directory

Where is the file or directory missing. Any help is appreciated.
 
P

Philip Semanchuk

Hi,

I'm trying to install psycopg2 on my system. I followed the
instruction in INSTALL file and gave the command
python setup.py build
running build
running build_py
running build_ext
error: No such file or directory

Where is the file or directory missing. Any help is appreciated.


Try asking on the psycopg2 mailing list.


Good luck
Philip
 
W

Wolodja Wentland

I'm trying to install psycopg2 on my system. I followed the
instruction in INSTALL file and gave the command
python setup.py build
running build
running build_py
running build_ext
error: No such file or directory

I ran into this some days ago. The problem is not related to the
distribution you downloaded, but to missing information about PostgreSQL
itself.

IIRC the file in question is "/usr/bin/pg_config". The file is probably packaged
in some lib*-dev package on your distribution.

--- Debian example ---
$ apt-file search /usr/bin/pg_config
libpq-dev: /usr/bin/pg_config
--- snip ---

thanks for all the fish

Wolodja

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iQIcBAEBCAAGBQJKuodHAAoJEIt/fTDK8U78+VgQAKdQ+43mhG6/qEfWZBxQnqbY
4/0k2104/skddNs0hTyaIMzuWvDUu+VZjCqbRwvkBULUB8e+2MyUaT+Hl61TYQgd
N+J+Xw9VkdBx8Lkh/HoX6D1ReAImMdH0SiKmOYJbBWzijvTVa6GVjKwuT8ltTxyu
nUDseY/FS7HtjknCUI91m/vvkSzsJRLOWiBpAMvo0pcX9YSbsVdM20Caqgv0DtgY
Ff5PJEHgFksCX9SSJeskgogRPdRUBlbyC4P26wk2LS/SViAxLmEZ4Qfx9kNJW3z6
HfYAu4aNlBeF6H9D0V+YJHSYdy72ftVYLOaS/qRgZevNngWOAPszwg9hLfBOOcC1
+Dk4DBWPCSSW1luByMIzZBSLd9DQ6D9l4efsjUsd8Y88LLQfl1cju64Mqp6D9wMt
BR2SlMrq3f+ww9THkvXLE9Ha5fl4PsW4G36sihaAUoeXBNYsIHd76snqJhtM6Ct5
n4PsOOn30TkPChEch8OBBBAFwQd5McvDXqz589mEh+29Dg6VStJ1kL7QDhfpdCUm
JodVoqqHwmRsuP+rSwoe4OL7Ir2uzNn21mcATKu1xWP85FYQLc44dFMNpuv653CY
pv/qqQjEM8tUEvIPT9NQ2cOG0ssF9kkj7mn4tMa7G3F7149ttl4Ojj6ZcU++ifXX
B9fnpsnZA6IWSyEUvAjv
=4zfA
-----END PGP SIGNATURE-----
 
W

Wolodja Wentland

--- Debian example ---
$ apt-file search /usr/bin/pg_config
libpq-dev: /usr/bin/pg_config
--- snip ---

Just wanted to note that libpq-dev is a dependency of
postgresql-server-dev-8.4 on squeeze. So you *might* want to consider
installing that instead of libpq-dev.

thanks for all the fish

Wolodja

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iQIcBAEBCAAGBQJKuomIAAoJEIt/fTDK8U78LUEP/08X0Rpj1KN+VQ78waHhINud
wUAnhlrjLX9NAJJWYgZw6Z8qGDtdf/uNnolDKPFj9gINfe4DyRX+BFaPv9oDb5GY
u+QNPGoUB660iAWfa416hFSEv3AtvsStYTS7nsmXramJlHOFfzndxtE56ow5qD5P
l602XFpOhmc06muuFX9SuyZWJ6lYrq9+nRTVoMfYbUjgS5Ng1imBrEreaQInox3b
t4LXng5YVPHJ0g4alEA8m94QZaJekfznZUfeVTKbhgCyyECJOEcek/FcDcMBoFp3
8CJ4q77qy0mz37hhdkOVRyZ9tdOT8aDH79NrVm85I/wn5msBp5teCcCn4MPFM8Jp
KgyGh/2vvOtSQJSeDwZdMOtJtj8/qDrLDQxBn8/ecXnAxLJJ1hgR8vXEAQ/Z4ZXL
t/GwsEV16rW/bG4+u801/5lnXCHTB5VhoSVTUYN4crD3ETPYh81rXCNaHab7qLIa
rIiur/tSGEssmUGKAiXDEt3MjtpQhVMMO1C6fXveQ4K8JLPzz/p5tmifnx/dRZGb
3W4zJu3FHOmjb8f6RV8mgNXRnpwR15ysjwn3xMF0r/ptKmx7AAI6g/zWzSn9me5u
+EZRBZmg06FllHdEjuCnX3wbhjbuKuLmh2ZTWWmCHcMQyI1Ut4kvSAhbmrvUJFgH
rrqOcXDneJ6Iao306UcQ
=YVrQ
-----END PGP SIGNATURE-----
 
P

philip

Quoting Wolodja Wentland said:
I ran into this some days ago. The problem is not related to the
distribution you downloaded, but to missing information about PostgreSQL
itself.

IIRC the file in question is "/usr/bin/pg_config". The file is
probably packaged
in some lib*-dev package on your distribution.

That's the most common install problem with psycopg2 -- setup.py can't
find (or execute) pg_config which it needs to decide how to talk to
Postgres. I remember it giving a different (and more descriptive)
error but I haven't used psycopg2 recently.

To the OP: if executing pg_config fails from the same command line in
which you're running setup.py, then Wolodja is absolutely correct. You
need to get pg_config on your path somewhere, or there might be an
environment variable you can set to tell setup where to find it if you
don't want it in your path.

Good luck
Philip
 
D

devaru

Quoting Wolodja Wentland <[email protected]>:






That's the most common install problem with psycopg2 -- setup.py can't  
find (or execute) pg_config which it needs to decide how to talk to  
Postgres. I remember it giving a different (and more descriptive)  
error but I haven't used psycopg2 recently.

To the OP: if executing pg_config fails from the same command line in  
which you're running setup.py, then Wolodja is absolutely correct. You  
need to get pg_config on your path somewhere, or there might be an  
environment variable you can set to tell setup where to find it if you  
don't want it in your path.

Good luck
Philip

Thank you all.

Yes, as Philip and Wolodja have said, we need pg_config in the PATH
variable for psycopg2 to build.
Then I ran into a problem where I had to install the dependency
package python-devel.
Now psycopg2 installed fine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,197
Messages
2,571,038
Members
47,633
Latest member
BriannaLyk

Latest Threads

Top