0

I found below link

http://python.projects.pgfoundry.org/docs/1.0/driver.html#connection-keywords

it says...

import postgresql.driver as pg_driver

is the way to import

i used -

import postgresql.driver as pg_driver
pg_driver.connect(user = self.username, password = self.password, host = self.host, port = self.port,sslmode = 'verify-full', sslrootcert=self.ssl_cert)

but it gives 'ImportError: No module named postgresql.driver'

i tried 'pip install postgresql' but it gives 'Could not find any downloads that satisfy the requirement postgresql No distributions at all found for postgresql'

how can i fixed that ???

1
  • I tend to favour using psycopg2 myself... Commented Aug 26, 2014 at 12:46

1 Answer 1

0

You can download latest version of py-postgresql and use 'Python34\python.exe setup.py install' to install it.

You can check Python34\Lib\site-packages\ if there is a folder called postgresql which proves it's installed correctly. Then try import postgresql.driver as pg_driver again and tell me if it works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.