Solution: Django Pipenv install mysqlclient error on windows

Hi there,
I put my solution here, you can follow it step by step.

  1. Go to Drive C
  2. Program files
  3. MySQL
  4. MySQL Server 8.0
  5. bin
  6. Copy the path
  7. Go to Start and search for: edit the system environment variables
  8. Click on “environment variables”
  9. In the “System variables” section, go to the PATH, then double click on “Path”
  10. Set the “MySQL” path with click on New, then paste the “MySQL” path which is the path that you copied in “Step 6”
  11. Click on all OK

Good luck :slightly_smiling_face:

1 Like

Thanks Paria, it just worked for me.

1 Like

That’s good. Happy coding :wink:

It is indeed the way. For it to work you HAVE to do it it exactly like that.

The python version seems to not be relevant here, I am using v3.11.

My 2 mistakes were to think that it’d work if:

  • I just add a new path without modifying the path first
  • or pasting the path to the end of the path
    Both of these did not work for me.