Roald Andre Kvarv
Roald Andre Kvarv

Reputation: 197

ModuleNotFoundError: No module named 'database'

I am trying to import a package. And when it is imported, it seems to be working, i can use its elements, but, i get an error still that says that there i no package named after what i imported. the error is this:

from database import DataBase
 ModuleNotFoundError: No module named 'database'

I think people would try to suggest to do

pip install databases

in to the terminal, and i have done that, and i have also done these in to the terminal as well just incase:

pip install databases[postgresql]
pip install databases[mysql]
pip install databases[sqlite]

And it just does not seem to work.

Upvotes: 0

Views: 27512

Answers (1)

CDJB
CDJB

Reputation: 14516

The following should work - note that Database is case sensitive. You can see the docs and some examples here.

from databases import Database

Upvotes: 1

Related Questions