python ImportError: No module named psycopg2

preview_player
Показать описание
python ImportError: No module named psycopg2
sudo apt-get install python-psycopg2
sudo pip install psycopg2
Please Like this Page to get Latest Python, Machine Learning and Artificial intelligence Tutorials

If you enjoy these videos and would like to support my channel, I would greatly appreciate any assistance.
Рекомендации по теме
Комментарии
Автор

i case you are unable to install psycopg2 with both commands do pip install psycopg2-binary this helped me

baakaboi
Автор

What if you're trying to install it on a virtualenv in Kali Linux? I get the error message: You need to install postgresql-server-dev-NN for building a server-side extension or libpq-dev for building a client-side application.
But when i try installing postgresql-server-dev i get "unable to locate package postgresql-server-dev". Can I get some help on this please?

naufalsarghini
Автор

You are doing this from a Linux terminal so you are using sudo command. What about DOS prompt?

annen
Автор

Thank you, actually what worked with me is the first command after a small edit: sudo apt-get install python3-psycopg2

LinuxEver
Автор

srry i need help. im install psycopg2 on my com(Linux). I can import on terminal but i cant import on pycharm.

mdm