[PYTHON] I was addicted to pip install mysqlclient

Conclusion

It was solved by installing python 64bit version. (feel like)

error

I got an error when pip install mysqlclient.

> pip install mysqlclient
Collecting mysqlclient
  Using cached mysqlclient-1.4.6.tar.gz (85 kB)
Installing collected packages: mysqlclient
    Running setup.py install for mysqlclient ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\parkh\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\parkh\\AppData\\Local\\Temp\\pip-install-jh98ljrf\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\parkh\\AppData\\Local\\Temp\\pip-install-jh98ljrf\\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\parkh\AppData\Local\Temp\pip-record-iqwk0kn0\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\parkh\appdata\local\programs\python\python37-32\Include\mysqlclient'
         cwd: C:\Users\parkh\AppData\Local\Temp\pip-install-jh98ljrf\mysqlclient\
    Complete output (24 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.7
    creating build\lib.win32-3.7\MySQLdb
    copying MySQLdb\__init__.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\_exceptions.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\compat.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\connections.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\converters.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\cursors.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\release.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\times.py -> build\lib.win32-3.7\MySQLdb
    creating build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\__init__.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\CR.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\ER.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.7\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: 'c:\users\parkh\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\parkh\\AppData\\Local\\Temp\\pip-install-jh98ljrf\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\parkh\\AppData\\Local\\Temp\\pip-install-jh98ljrf\\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\parkh\AppData\Local\Temp\pip-record-iqwk0kn0\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\parkh\appdata\local\programs\python\python37-32\Include\mysqlclient' Check the logs for full command output.

Try putting in C ++ Build Tools

image.png

> pip install mysqlclient
Collecting mysqlclient
  Using cached mysqlclient-1.4.6.tar.gz (85 kB)
Installing collected packages: mysqlclient
    Running setup.py install for mysqlclient ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\parkh\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\parkh\\AppData\\Local\\Temp\\pip-install-pk832a_j\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\parkh\\AppData\\Local\\Temp\\pip-install-pk832a_j\\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\parkh\AppData\Local\Temp\pip-record-899z4ym7\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\parkh\appdata\local\programs\python\python37-32\Include\mysqlclient'
         cwd: C:\Users\parkh\AppData\Local\Temp\pip-install-pk832a_j\mysqlclient\
    Complete output (30 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.7
    creating build\lib.win32-3.7\MySQLdb
    copying MySQLdb\__init__.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\_exceptions.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\compat.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\connections.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\converters.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\cursors.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\release.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\times.py -> build\lib.win32-3.7\MySQLdb
    creating build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\__init__.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\CR.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\ER.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.7\MySQLdb\constants
    running build_ext
    building 'MySQLdb._mysql' extension
    creating build\temp.win32-3.7
    creating build\temp.win32-3.7\Release
    creating build\temp.win32-3.7\Release\MySQLdb
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Dversion_info=(1,4,6,'final',0) -D__version__=1.4.6 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include\mariadb" -Ic:\users\parkh\appdata\local\programs\python\python37-32\include -Ic:\users\parkh\appdata\local\programs\python\python37-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /TcMySQLdb/_mysql.c /Fobuild\temp.win32-3.7\Release\MySQLdb/_mysql.obj /Zl /D_CRT_SECURE_NO_WARNINGS
    _mysql.c
    MySQLdb/_mysql.c(29): fatal error C1083:Unable to open include file.'mysql.h':No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\parkh\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\parkh\\AppData\\Local\\Temp\\pip-install-pk832a_j\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\parkh\\AppData\\Local\\Temp\\pip-install-pk832a_j\\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\parkh\AppData\Local\Temp\pip-record-899z4ym7\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\parkh\appdata\local\programs\python\python37-32\Include\mysqlclient' Check the logs for full command output.

Try putting mysql client

image.png image.png image.png image.png

This was no good.

I feel like I'm being told that python 64bit isn't included

I uninstalled python 32bit and installed python 64. It doesn't go away ...

I restarted it just in case.

> pip install pymysql
Collecting pymysql
  Using cached https://files.pythonhosted.org/packages/ed/39/15045ae46f2a123019aa968dfcba0396c161c20f855f11dea6796bcaae95/PyMySQL-0.9.3-py2.py3-none-any.whl
Installing collected packages: pymysql
Successfully installed pymysql-0.9.3

Finally successful!

Recommended Posts

I was addicted to pip install mysqlclient
I was addicted to multiprocessing + psycopg2
I want to pip install with PythonAnywhere
I was addicted to Flask on dotCloud
What I was addicted to Python autorun
How to install pip
[Introduction to json] No, I was addicted to it. .. .. ♬
A story I was addicted to trying to install LightFM on Amazon Linux
What to do if you can't pip install mysqlclient
I was addicted to scraping with Selenium (+ Python) in 2020
A story that I was addicted to at np.where
I was addicted to trying logging.getLogger in Flask 1.1.x
What I was addicted to when using Python tornado
[IOS] GIF animation with Pythonista3. I was addicted to it.
What I was addicted to when migrating Processing users to Python
What to do if pip install mysqlclient fails on MacOS
[Fixed] I was addicted to alphanumeric judgment of Python strings
How to install mysql-connector with pip3
When I tried to install PIL and matplotlib in a virtualenv environment, I was addicted to it.
A story that I was addicted to calling Lambda from AWS Lambda.
The record I was addicted to when putting MeCab on Heroku
What I was addicted to when introducing ALE to Vim for Python
What I was addicted to with json.dumps in Python base64 encoding
A note I was addicted to when making a beep on Linux
I get an error when trying to install maec 4.0.1.0 with pip
Note that I was addicted to sklearn's missing value interpolation (Imputer)
A note I was addicted to when creating a table with SQLAlchemy
I was addicted to confusing class variables and instance variables in Python
`pip install pygraphviz` fails to find graphviz
Install python on xserver to use pip
I just did pip install pyrebase ... (UnicodeDecodeError)
I can't install the package with pip.
Two things I was addicted to building Django + Apache + Nginx on Windows
I was addicted to running tensorflow on GPU with NVIDIA driver 440 + CUDA 10.2
PyPi debut I tried to pip install a library to check Japanese holidays
A story I was addicted to when inserting from Python to a PostgreSQL table
I was addicted to creating a Python venv environment with VS Code
A story I was addicted to trying to get a video url with tweepy
Use Python from Java with Jython. I was also addicted to it.
I was addicted to not being able to use Markdown on pypi's long_description
The file name was bad in Python and I was addicted to import
[Python] I was addicted to not saving internal variables of lambda expressions
I was addicted to trying Cython with PyCharm, so make a note
What I was addicted to when creating a web application in a windows environment
I tried to publish my own module so that I can pip install it
sudo pip install
I was able to recurse in Python: lambda
How to install pip, numpy in Autodesk MAYA
Note: What to do if pip install fails
I wanted to install Python 3.4.3 with Homebrew + pyenv
I failed to install django with pip, so a reminder of the solution
Three things I was addicted to when using Python and MySQL with Docker
AtCoder AGC 041 C --I was addicted to the full search of Domino Quality
Summary of points I was addicted to running Selenium on AWS Lambda (python)
Docker x visualization didn't work and I was addicted to it, so I summarized it!
A note I was addicted to when running Python with Visual Studio Code
A story that I was addicted to when I made SFTP communication with python
I set up TensowFlow and was addicted to it, so make a note
Steps to install your own library with pip
I was soberly addicted to calling awscli from a Python 2.7 script registered in crontab
Note that I was addicted to npm script not passing in the verification environment