[Fixed]-ImportRrror: no module named 'psycopg2'

1๐Ÿ‘

Seems like you are in Windows. For windows, you need to download and install from the binary files. You can download the installers from here.

http://www.stickpeople.com/projects/python/win-psycopg/

Make sure you select the correct file based on architecture and python version.

After installing the psycopg2 with the installers, re-create your virtual environments to have the plugin working.

Alternatively you can download and install C++ re-distributables from msdn download centre and then try with pip install psycopg2

๐Ÿ‘คbrainless coder

1๐Ÿ‘

It is important to specify operating system you are on, as I guess from comment you are using windows.

On windows if you do not wont to install Visual C++ libraries you can just download whl file of the package.

http://www.lfd.uci.edu/~gohlke/pythonlibs/#psycopg

choose correct architecture and python version for you and run

pip install path/to/packagename.whl

make sure you are using pip version 6 or newer

๐Ÿ‘คdemonno

-1๐Ÿ‘

Before you install psycopg2 please isntall sudo apt-get build-dep python-psycopg2

๐Ÿ‘คgamer

Leave a comment