postgresql - install pyscopg2 on windows 7 64 bits + python 3.4 -
i've read several links that.
if try python port windows: i'm using python 3.4 fails.
for both downloading archive + "setup.py install" or "pip install pyscopg2" got below error. had visual studio 2012 installed, installed 2010 version rid of "vcvarsall.bat not found"
error:
c:\program files (x86)\microsoft visual studio 10.0\vc\bin\link.exe /dll /nologo /incremental:no /libpath:c:\python34\libs /libpath:c:\python34\pcbuild /libpath:c:/progra~1/postgr~1/9.3/lib ws2_32.lib advapi32.lib secur32.lib libpq.lib shfolder.lib build\temp.win32-3.4\release\psycopg\psycopgmodule.obj build\temp.win32-3.4\release\psycopg\green.obj build\temp.win32-3.4\release\psycopg\pqpath.obj build\temp.win32-3.4\release\psycopg\utils.obj build\temp.win32-3.4\release\psycopg\bytes_format.obj build\temp.win32-3.4\release\psycopg\connection_int.obj build\temp.win32-3.4\release\psycopg\connection_type.obj build\temp.win32-3.4\release\psycopg\cursor_int.obj build\temp.win32-3.4\release\psycopg\cursor_type.obj build\temp.win32-3.4\release\psycopg\diagnostics_type.obj build\temp.win32-3.4\release\psycopg\error_type.obj build\temp.win32-3.4\release\psycopg\lobject_int.obj build\temp.win32-3.4\release\psycopg\lobject_type.obj build\temp.win32-3.4\release\psycopg\notify_type.obj build\temp. win32-3.4\release\psycopg\xid_type.obj build\temp.win32-3.4\release\psycopg\adapter_asis.obj build\temp.win32-3.4\release\psycopg\adapter_binary.obj build\temp.win32-3.4\release\psycopg\adapter_datetime.obj build\temp.win32-3.4\release\psycopg\adapter_list.obj build\temp.win32-3.4\release\psycopg\adapter_pboolean.obj build\temp.win32-3.4\release\psycopg\adapter_pdecimal.obj build\temp.win32-3.4\release\psycopg\adapter_pint.obj build\temp.win32-3.4\release\psycopg\adapter_pfloat.obj build\temp.win32-3.4\release\psycopg\adapter_qstring.obj build\temp.win32-3.4\release\psycopg\microprotocols.obj build\temp.win32-3.4\release\psycopg\microprotocols_proto.obj build\temp.win32-3.4\release\psycopg\typecast.obj /out:build\lib.win32-3.4\psycopg2\_psycopg.pyd /implib:build\temp.win32-3.4\release\psycopg\_psycopg.lib /manifestfile:build\temp.win32-3.4\release\psycopg\_psycopg.pyd.manifest creating library build\temp.win32-3.4\release\psycopg\_psycopg.lib , object build\temp.win32-3.4\release\psycopg\_psycopg.exp pqpath.obj : error lnk2019: unresolved external symbol _pqclear referenced in function _pq_raise connection_int.obj : error lnk2001: unresolved external symbol _pqclear cursor_type.obj : error lnk2001: unresolved external symbol _pqclear error_type.obj : error lnk2001: unresolved external symbol _pqclear pqpath.obj : error lnk2019: unresolved external symbol _pqerrormessage referenced in function _pq_raise connection_int.obj : error lnk2001: unresolved external symbol _pqerrormessage lobject_int.obj : error lnk2001: unresolved external symbol _pqerrormessage pqpath.obj : error lnk2019: unresolved external symbol _pqresulterrorfield referenced in function _pq_raise diagnostics_type.obj : error lnk2001: unresolved external symbol _pqresulterrorfield pqpath.obj : error lnk2019: unresolved external symbol _pqresulterrormessage referenced in function _pq_raise pqpath.obj : error lnk2019: unresolved external symbol _pqstatus referenced in function _pq_raise connection_int.obj : error lnk2001: unresolved external symbol _pqstatus pqpath.obj : error lnk2019: unresolved external symbol _pqgetresult referenced in function _pq_clear_async pqpath.obj : error lnk2019: unresolved external symbol _pqsetnonblocking referenced in function _pq_set_non_blocking pqpath.obj : error lnk2019: unresolved external symbol _pqresultstatus referenced in function _pq_execute_command_locked connection_int.obj : error lnk2001: unresolved external symbol _pqresultstatus pqpath.obj : error lnk2019: unresolved external symbol _pqexec referenced in function _pq_execute_command_locked pqpath.obj : error lnk2019: unresolved external symbol _pqgetvalue referenced in function _pq_get_guc_locked cursor_type.obj : error lnk2001: unresolved external symbol _pqgetvalue pqpath.obj : error lnk2019: unresolved external symbol _pqisbusy referenced in function _pq_is_busy pqpath.obj : error lnk2019: unresolved external symbol _pqconsumeinput referenced in function _pq_is_busy pqpath.obj : error lnk2019: unresolved external symbol _pqflush referenced in function _pq_flush connection_int.obj : error lnk2001: unresolved external symbol _pqflush pqpath.obj : error lnk2019: unresolved external symbol _pqsendquery referenced in function _pq_send_query pqpath.obj : error lnk2019: unresolved external symbol _pqfname referenced in function __pq_fetch_tuples pqpath.obj : error lnk2019: unresolved external symbol _pqfmod referenced in function __pq_fetch_tuples pqpath.obj : error lnk2019: unresolved external symbol _pqfsize referenced in function __pq_fetch_tuples pqpath.obj : error lnk2019: unresolved external symbol _pqftype referenced in function __pq_fetch_tuples pqpath.obj : error lnk2019: unresolved external symbol _pqbinarytuples referenced in function __pq_fetch_tuples pqpath.obj : error lnk2019: unresolved external symbol _pqnfields referenced in function __pq_fetch_tuples cursor_type.obj : error lnk2001: unresolved external symbol _pqnfields pqpath.obj : error lnk2019: unresolved external symbol _pqputcopyend referenced in function __pq_copy_in_v3 pqpath.obj : error lnk2019: unresolved external symbol _pqputcopydata referenced in function __pq_copy_in_v3 pqpath.obj : error lnk2019: unresolved external symbol _pqfreemem referenced in function __pq_copy_out_v3 connection_int.obj : error lnk2001: unresolved external symbol _pqfreemem adapter_binary.obj : error lnk2001: unresolved external symbol _pqfreemem pqpath.obj : error lnk2019: unresolved external symbol _pqgetcopydata referenced in function __pq_copy_out_v3 pqpath.obj : error lnk2019: unresolved external symbol _pqntuples referenced in function _pq_fetch pqpath.obj : error lnk2019: unresolved external symbol _pqoidvalue referenced in function _pq_fetch pqpath.obj : error lnk2019: unresolved external symbol _pqcmdtuples referenced in function _pq_fetch pqpath.obj : error lnk2019: unresolved external symbol _pqcmdstatus referenced in function _pq_fetch pqpath.obj : error lnk2019: unresolved external symbol _pqresstatus referenced in function _pq_fetch utils.obj : error lnk2019: unresolved external symbol _pqescapestring referenced in function _psycopg_escape_string utils.obj : error lnk2019: unresolved external symbol _pqescapestringconn referenced in function _psycopg_escape_string connection_int.obj : error lnk2019: unresolved external symbol _pqnotifies referenced in function _conn_notifies_process connection_int.obj : error lnk2019: unresolved external symbol _pqparameterstatus referenced in function _conn_get_standard_conforming_strings connection_type.obj : error lnk2001: unresolved external symbol _pqparameterstatus connection_int.obj : error lnk2019: unresolved external symbol _pqprotocolversion referenced in function _conn_get_protocol_version connection_int.obj : error lnk2019: unresolved external symbol _pqserverversion referenced in function _conn_get_server_version connection_int.obj : error lnk2019: unresolved external symbol _pqgetcancel referenced in function _conn_setup_cancel connection_int.obj : error lnk2019: unresolved external symbol _pqfreecancel referenced in function _conn_setup_cancel connection_type.obj : error lnk2001: unresolved external symbol _pqfreecancel connection_int.obj : error lnk2019: unresolved external symbol _pqsetnoticeprocessor referenced in function __conn_sync_connect connection_int.obj : error lnk2019: unresolved external symbol _pqconnectstart referenced in function __conn_sync_connect connection_int.obj : error lnk2019: unresolved external symbol _pqconnectdb referenced in function __conn_sync_connect connection_int.obj : error lnk2019: unresolved external symbol _pqconnectpoll referenced in function __conn_poll_connecting connection_int.obj : error lnk2019: unresolved external symbol _pqfinish referenced in function _conn_close_locked connection_type.obj : error lnk2019: unresolved external symbol _pqtransactionstatus referenced in function _psyco_conn_get_transaction_status connection_type.obj : error lnk2019: unresolved external symbol _pqbackendpid referenced in function _psyco_conn_get_backend_pid connection_type.obj : error lnk2019: unresolved external symbol _pqsocket referenced in function _psyco_conn_fileno connection_type.obj : error lnk2019: unresolved external symbol _pqcancel referenced in function _psyco_conn_cancel cursor_type.obj : error lnk2019: unresolved external symbol _pqgetlength referenced in function __psyco_curs_buildrow_fill cursor_type.obj : error lnk2019: unresolved external symbol _pqgetisnull referenced in function __psyco_curs_buildrow_fill lobject_int.obj : error lnk2019: unresolved external symbol _lo_open referenced in function _lobject_open lobject_int.obj : error lnk2019: unresolved external symbol _lo_creat referenced in function _lobject_open lobject_int.obj : error lnk2019: unresolved external symbol _lo_create referenced in function _lobject_open lobject_int.obj : error lnk2019: unresolved external symbol _lo_import referenced in function _lobject_open lobject_int.obj : error lnk2019: unresolved external symbol _lo_close referenced in function _lobject_close_locked lobject_int.obj : error lnk2019: unresolved external symbol _lo_unlink referenced in function _lobject_unlink lobject_int.obj : error lnk2019: unresolved external symbol _lo_write referenced in function _lobject_write lobject_int.obj : error lnk2019: unresolved external symbol _lo_read referenced in function _lobject_read lobject_int.obj : error lnk2019: unresolved external symbol _lo_lseek referenced in function _lobject_seek lobject_int.obj : error lnk2019: unresolved external symbol _lo_tell referenced in function _lobject_tell lobject_int.obj : error lnk2019: unresolved external symbol _lo_export referenced in function _lobject_export lobject_int.obj : error lnk2019: unresolved external symbol _lo_truncate referenced in function _lobject_truncate adapter_binary.obj : error lnk2019: unresolved external symbol _pqescapebytea referenced in function _binary_escape adapter_binary.obj : error lnk2019: unresolved external symbol _pqescapebyteaconn referenced in function _binary_escape build\lib.win32-3.4\psycopg2\_psycopg.pyd : fatal error lnk1120: 62 unresolved externals error: command '"c:\program files (x86)\microsoft visual studio 10.0\vc\bin\link.exe"' failed exit status 1120
i tried add 'lib' , 'include' directories of postregsql install path path. indeed, missing symbols seem defined there (libpq.obj/c/h) ! started new 'cmd', same result.
we ended using binaries here via pip -> https://github.com/nwcell/psycopg2-windows via python 3.4
pip install git+https://github.com/nwcell/psycopg2-windows.git@win64-py34#egg=psycopg2
as mentioned in thread, http://www.lfd.uci.edu/~gohlke/pythonlibs/#psycopg resource too, first solution solved issue.
Comments
Post a Comment