Re: [psycopg] Import issue after PIP install

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: [psycopg] Import issue after PIP install
Дата
Msg-id c6260463-af42-279c-92e6-cad29bcf9e55@aklaver.com
обсуждение исходный текст
Ответ на [psycopg] Import issue after PIP install  (Mike Rice <michael.rice@gmail.com>)
Ответы Re: [psycopg] Import issue after PIP install  (Mike Rice <michael.rice@gmail.com>)
Список psycopg
On 06/06/2017 07:22 AM, Mike Rice wrote:
> I'm currently trying to test out using psycopg2 and did a PIP install on
> my windows machine.  The problem is that as soon as I import the module
> I get the following error thrown back:
>
>
--------------------------------------------------------------------------------------------------------------------------------------
>    File
> "\\192.168.88.142\Mike\development\python\postgresql_connect_test.py",
> line 3, in <module>
>      import psycopg2
>    File "C:\Python 3.6\lib\site-packages\psycopg2\__init__.py", line 50,
> in <module>
>      from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
> ImportError: can't import datetime module
>
--------------------------------------------------------------------------------------------------------------------------------------
>
> I'm still in the process of learning Python, and my Google-Fu has failed
> me in finding out what's going on here.  Any help would be appreciated.

The datetime  module is part of the standard library for Python so it
should be there. I suspect some install/PATH issue with the Python
install itself. So:

1) How did you install Python on Windows?

2) Where is \\192.168.88.142?

>
> --
> - Mike


--
Adrian Klaver
adrian.klaver@aklaver.com


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

Предыдущее
От: Mike Rice
Дата:
Сообщение: [psycopg] Import issue after PIP install
Следующее
От: Mike Rice
Дата:
Сообщение: Re: [psycopg] Import issue after PIP install