psycopg2 module installation

         My platform is win10 (x64), python3.7, intends to operate the Greenplum database by psycopg2 module, I installed psycopg2 module pip install psycopg2, also suggest that the installation was successful, but I am suggesting that I module unknown at the time of import psycopg2 , does not exist, it makes me very depressed, so I find the reasons in the stack overfloow find the reasons. Although my windows system is 64-bit, but I installed python3.7 is a 32-bit (see input in python dos window)

In fact, all installed python modules must have the same number of digits python, rather than the same number of bits system, since the pip install psycopg2 install a 64-bit version of psycopg2, so there have not imported case.

           Solution is relatively simple, first in the official website to download the corresponding 32-bit on, pyhton3.7 psycopg2 the module, i.e., represents version 3.7 CP37

Then download the files in the directory, execute pip install psycopg2-2.8.2-cp37-cp37m-win32.whl, complete the installation, re-run import psycopg2, no errors.

 

Guess you like

Origin www.cnblogs.com/hgz-dm/p/10938973.html