Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

SQLAlchemy successfully installed, but I still get error ModuleNotFound

I am trying run code which is using SQLAlchemy. I use PyCharm with virtual environment. I don’t have this problem few weeks ago and now I don’t know what is wrong.

What I have tried:

1.) deleting venv folder from project, and set new virtual interpreter.
Didn’t help, I clicked on Install package SQLAlchemy, get notification that package was successfully installed, but it is still underlined and if I try to run, I get error ModuleNotFound…
SQLAlchemy

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

2.) trying to install it from Terminal in PyCharm

(venv) cipisek@macbookair Starting+Files+-+cafe-api-start % pip3 install SQLAlchemy
Requirement already satisfied: SQLAlchemy in ./venv/lib/python3.9/site-packages (1.4.41)

After this, still same problem. SQLAlchemy2

3.) completely new project, with new virtual environment… same problem :/

4.) importing only SQLAlchemy instead from flask_sqlalchemy import SQLAlchemy import SQLAlchemy

Traceback (most recent call last):
  File "/Users/cipisek/PycharmProjects/Starting+Files+-+cafe-api-start/main.py", line 2, in <module>
    import SQLAlchemy
ModuleNotFoundError: No module named 'SQLAlchemy'

If I tried to check packages which are installed in my environment, the SQLAlchemy is there. I don’t understand why it is not working. List of installed packeges Could someone help me please?

I have found similar problems on this forum, but there aren’t any solutions which solve my problem.

>Solution :

I have the same problem, but after reinstalling PyCharm everything works fine.

Or you can try to delete and install again sqlAlchemy via terminal, that also may work:

pip uninstall SQLAlchemy
pip install SQLAlchemy
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading