Pipenv install mysqlclient error solution

Hi there,

I had a recurring problem with using the pipenv install mysqlclient command in the terminal in VS Code. The output is far too long to print here, but basically it couldn’t find a number of dependencies.

I don’t know how, but I found that the problem was that the pipfile in the Django course resources contains an old version of mysqlclient (2.0.3), which isn’t compatible with Python 3.10. Rather than downgrading to Python 3.9 or earlier, I used:

pipenv install mysqlclient==2.1.0

This installed the current latest version of mysqlclient. I could then run pipenv install and load all the dependencies for my virtual environment.

2 Likes

You my friend are a life saver!! I have been pulling my hair out trying to resolve the issue of connecting mysql to Ubuntu for a week now. I saw your post after I posted my plee for help and your suggestion worked.

Cannot thank you enough. Good job.