#๐Ÿ”’ Python Debugger (Fast API) throws ModuleNotFoundError: No module named 'pymysql'

4 messages ยท Page 1 of 1 (latest)

steep fulcrum
#

Hi folks,

I have a Swagger (web app) written in Python.

When I run the Fast API Python Debugger in Visual Studio Code. It throws following error:

File "/Users/<path_to_my_project>/venv/lib/python3.11/site-packages/sqlalchemy/dialects/mysql/pymysql.py", line 75, in import_dbapi
return import("pymysql")
^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'pymysql'

On the other hand, when I execute uvicorn app.main:app --reload from the integrated VS Code terminal, then my app is successfully running. Most likely there is an issue in configuration of my Fast API Python Debugger, or maybe it's the bug?

median geodeBOT
#

@steep fulcrum

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

median geodeBOT
#

@steep fulcrum

Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.