0

Run command :-pip install mysql
when i installing mysql in xampp using pip get error.
and How install the mysql using pip?
where to install mysql
i tired to solve this problem give me right solution for this problem

E:\xampp\Python\Scripts>pip install mysql
Collecting mysql
  Using cached mysql-0.0.2.tar.gz (1.9 kB)
Collecting mysqlclient
  Using cached mysqlclient-1.4.6.tar.gz (85 kB)
Installing collected packages: mysqlclient, mysql
    Running setup.py install for mysqlclient ... error
    ERROR: Command errored out with exit status 1:
     command: 'e:\xampp\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Rakesh\\AppData\\Local\\Temp\\pip-install-z1tn9j9l\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\Rakesh\\AppData\\Local\\Temp\\pip-install-z1tn9j9l\\mysqlclient\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Rakesh\AppData\Local\Temp\pip-record-034p88rc\install-record.txt' --single-version-externally-managed --compile --install-headers 'e:\xampp\python\Include\mysqlclient'
         cwd: C:\Users\Rakesh\AppData\Local\Temp\pip-install-z1tn9j9l\mysqlclient\
    Complete output (24 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.8
    creating build\lib.win32-3.8\MySQLdb
    copying MySQLdb\__init__.py -> build\lib.win32-3.8\MySQLdb
    copying MySQLdb\_exceptions.py -> build\lib.win32-3.8\MySQLdb
    copying MySQLdb\compat.py -> build\lib.win32-3.8\MySQLdb
    copying MySQLdb\connections.py -> build\lib.win32-3.8\MySQLdb
    copying MySQLdb\converters.py -> build\lib.win32-3.8\MySQLdb
    copying MySQLdb\cursors.py -> build\lib.win32-3.8\MySQLdb
    copying MySQLdb\release.py -> build\lib.win32-3.8\MySQLdb
    copying MySQLdb\times.py -> build\lib.win32-3.8\MySQLdb
    creating build\lib.win32-3.8\MySQLdb\constants
    copying MySQLdb\constants\__init__.py -> build\lib.win32-3.8\MySQLdb\constants
    copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.8\MySQLdb\constants
    copying MySQLdb\constants\CR.py -> build\lib.win32-3.8\MySQLdb\constants
    copying MySQLdb\constants\ER.py -> build\lib.win32-3.8\MySQLdb\constants
    copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.8\MySQLdb\constants
    copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.8\MySQLdb\constants
    running build_ext
    building 'MySQLdb._mysql' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'e:\xampp\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Rakesh\\AppData\\Local\\Temp\\pip-install-z1tn9j9l\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\Rakesh\\AppData\\Local\\Temp\\pip-install-z1tn9j9l\\mysqlclient\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Rakesh\AppData\Local\Temp\pip-record-034p88rc\install-record.txt' --single-version-externally-managed --compile --install-headers 'e:\xampp\python\Include\mysqlclient' Check the logs for full command output.

rakeshboliya
  • 103
  • 12
  • https://stackoverflow.com/search?q=%5Bpip%5D+%5Bmysql%5D+error%3A+Microsoft+Visual+C%2B%2B+14.0+is+required – phd Apr 25 '20 at 14:04

1 Answers1

1

Are you sure you need the 'mysql' package from pip and not the following:

pip install mysql-connector
Alex R.
  • 459
  • 5
  • 16