소개 : Trac SQLite를 PostgreSQL 백엔드로 마이그레이션하려고합니다. psycopg2가 필요합니다. www.initd.org에서 창피한 호언 장담을 클릭하면 최신 버전을 다운로드하고 setup.py install
을 실행 해 보았습니다. 이것은 작동하지 않았고, 나는 밍크가 필요하다는 것을 알았다. 그래서 나는 mingw를 다운로드하고 설치했다. 나는 앞으로 -L 옵션에 슬래시 발견, 그래서 수동으로 PostgreSQL을 입력 -psycopg2를 설치할 때 "-lpq"을 찾을 수 없습니다.
running build_ext
building 'psycopg2._psycopg' extension
writing build\temp.win32-2.4\Release\psycopg\_psycopg.def
C:\mingw\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-2.4\Release\psycopg
\psycopgmodule.o build\temp.win32-2.4\Release\psycopg\pqpath.o build\temp.win32-
2.4\Release\psycopg\typecast.o build\temp.win32-2.4\Release\psycopg\microprotoco
ls.o build\temp.win32-2.4\Release\psycopg\microprotocols_proto.o build\temp.win3
2-2.4\Release\psycopg\connection_type.o build\temp.win32-2.4\Release\psycopg\con
nection_int.o build\temp.win32-2.4\Release\psycopg\cursor_type.o build\temp.win3
2-2.4\Release\psycopg\cursor_int.o build\temp.win32-2.4\Release\psycopg\lobject_
type.o build\temp.win32-2.4\Release\psycopg\lobject_int.o build\temp.win32-2.4\R
elease\psycopg\adapter_qstring.o build\temp.win32-2.4\Release\psycopg\adapter_pb
oolean.o build\temp.win32-2.4\Release\psycopg\adapter_binary.o build\temp.win32-
2.4\Release\psycopg\adapter_asis.o build\temp.win32-2.4\Release\psycopg\adapter_
list.o build\temp.win32-2.4\Release\psycopg\adapter_datetime.o build\temp.win32-
2.4\Release\psycopg\_psycopg.def -LC:\Python24\libs -LC:\Python24\PCBuild -Lc:/P
ROGRA~1/POSTGR~1/8.3/lib -lpython24 -lmsvcr71 -lpq -lmsvcr71 -lws2_32 -ladvapi32
-o build\lib.win32-2.4\psycopg2\_psycopg.pyd
C:\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot fin
d -lpq
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
내가 시도했다 :
문제는 : setup.py build_ext --compiler=mingw32 install
을 실행할 때 이제 다음과 같은 오류가 lib 디렉토리에서 setup.cfg의 library_dirs 옵션을 사용하면 아무 쓸모가 없습니다 (호출에 백 슬래시가있는 -L 옵션이 있지만 오류 메시지가 그대로 유지됨).
감사합니다. – Epaga