python - How to install psycopg2 for python2.6 when there is also 2.7 installed? -
i tried install psycopg2 python2.6 scheme has 2.7 installed.
i did
>sudo -e pip install psycopg2 downloading/unpacking psycopg2 downloading psycopg2-2.5.3.tar.gz (690kb): 690kb downloaded running setup.py (path:/private/var/folders/yw/qn50zv_151bfq2vxhc60l8s5vkymm3/t/pip_build_root/psycopg2/setup.py) egg_info bundle psycopg2 installing collected packages: psycopg2 running setup.py install psycopg2 building 'psycopg2._psycopg' extension cc -dndebug -g -fwrapv -os -wall -wstrict-prototypes -qunused-arguments -qunused-arguments -arch x86_64 -arch i386 -pipe -dpsycopg_default_pydatetime=1 -dpsycopg_version="2.5.3 (dt dec pq3 ext)" -dpsycopg_extensions=1 -dpsycopg_new_boolean=1 -dhave_pqfreemem=1 -dpg_version_hex=0x09010b -dpsycopg_extensions=1 -dpsycopg_new_boolean=1 -dhave_pqfreemem=1 -i/system/library/frameworks/python.framework/versions/2.7/include/python2.7 -i. -i/usr/local/cellar/postgresql91/9.1.11/include -i/usr/local/cellar/postgresql91/9.1.11/include/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.9-intel-2.7/psycopg/psycopgmodule.o ...
you can see pip associating psycopg2 python2.7 during install process. pip install completed reported success result when ran 2.6 script after that imports psycopg2, couldn't find it:
import psycopg2 importerror: no module named psycopg2
how install psycopg2 python2.6 when there 2.7 installed?
as per this answer, installed pip2.6. installed psycopg2
using pip2.6
command , not pip before:
sudo -e pip2.6 install psycopg2
then worked
python pip psycopg2
No comments:
Post a Comment