Re: Problems with Python 3.2.

Поиск
Список
Период
Сортировка
От Daniele Varrazzo
Тема Re: Problems with Python 3.2.
Дата
Msg-id CA+mi_8aNBUOPba_uyV63X59OHR9B4f2xYnz_6WnQ6JoD5=RLgA@mail.gmail.com
обсуждение исходный текст
Ответ на Problems with Python 3.2.  (Nicklas Börjesson <Nicklas.Borjesson@ws.se>)
Список psycopg
2011/9/25 Nicklas Börjesson <Nicklas.Borjesson@ws.se>:
> Hi all,
> My name is Nicklas, new to the list.

Hi Nicklas, nice to read yo.


> Well I'll get to it, I try and import psycopg2 using Python 3.2, and then I get this error:
>  File "/test.py", line 46, in ConnectToDB
>    import psycopg2
>  File "/usr/local/lib/python3.2/dist-packages/psycopg2/__init__.py", line 67, in <module>
>    from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
> ImportError: /usr/local/lib/python3.2/dist-packages/psycopg2/_psycopg.so: undefined symbol: _Py_ZeroStruct
>
> Since i have multiple python versions, I have simply build the package(python setup.py build) and copied the contents
tothe place where packages seem to end up(/usr/local/lib/python3.2/dist-packages/). 

You are building psycopg with the wrong python. try /path/to/python3.2
setup.py build and then copy that library into the right library. to
know which one execute py 3.2 again and check the sys.path.


> I am having a similar problem with pyodbc.

You have the same problem there: it's not psycopg2 specific.

-- Daniele

В списке psycopg по дате отправления:

Предыдущее
От: Nicklas Börjesson
Дата:
Сообщение: Problems with Python 3.2.
Следующее
От: Grant McKenzie
Дата:
Сообщение: Cursor copy_from with server crash