skip to Main Content

enter image description here.
while using this command –

pip install mysql

I am facing issue in code in above

error: subprocess-exited-with-error

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.

I try pip3 install mysql

2

Answers


  1. This can be because you are using a newer Python version which doesn’t support MySQL.

    Try to use Python 3.9.

    Login or Signup to reply.
  2. The mysql package you are trying to install is not a valid package name, so pip is not able to find it. If you are trying to install a Python connector for MySQL, you should use the mysql-connector-python package instead.

    pip install mysql-connector-python
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search