I am using python2.7 and trying to import modules such as psycopg2. But I get the following error when I try to import the module:
import psycopg2
ImportError: No module named psycopg2
When I try pip to install the module it gives me the following message:
Requirement already satisfied (use --upgrade to upgrade): psycopg2 in /usr/local/lib/python2.7/dist-packages
Cleaning up...
Can anyone please tell me what I am doing wrong?
Is the module installed in your PYTHONPATH?
You can verify running this command line:
python -c "import sys; print '/usr/local/lib/python2.7/dist-packages' in sys.path"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With