techleadhd / chatgpt-retrieval

1.65k stars 786 forks source link

ImportError: cannot import name 'URL' from 'sqlalchemy' #44

Open bdrhoa opened 9 months ago

bdrhoa commented 9 months ago

Trying to run:

python chatgpt.py "what is my dog's name"

I get:

ImportError: cannot import name 'URL' from 'sqlalchemy' (/Users/brad/anaconda3/lib/python3.11/site-packages/sqlalchemy/__init__.py)

jrafaels commented 8 months ago

Similar error. I'm getting: ImportError: cannot import name 'Engine' from 'sqlalchemy' (C:\Users\rafae\AppData\Roaming\Python\Python311\site -packages\sqlalchemy\__init__.py)

jramasani commented 8 months ago

try installing sqlalchemy pip install flask-sqlalchemy

nucleare commented 7 months ago

I had a similar issue and when running pip install sqlalchemy it might simply respond with saying Requirement already satisfied: sqlalchemy so nothing would change.

For me, this was fixed when, instead, I ran pip install sqlalchemy --upgrade as it proceeded to initiate downloading the latest version despite the "requirement already satisfied".