Error install requirements.txt Django project Mac M1 - python

I got my Django project via gitlab and put it on my Macbook M1 but when I put myself in the virtual environment and I install the requirements I have a long error message that appears, I don't don't know how to fix this.
Could it be because of the apple silicon chip?
Here is the error message:
Running setup.py install for mysqlclient ... error
ERROR: Command errored out with exit status 1:
command: /Users/pierro/Documents/permacool/api_permacool/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/f2/r4cvtlb53hb3r3bvpzkmqnyr0000gn/T/pip-install-zdiid0g3/mysqlclient_87a039d3b25c4c3f8c32778ba1e13516/setup.py'"'"'; __file__='"'"'/private/var/folders/f2/r4cvtlb53hb3r3bvpzkmqnyr0000gn/T/pip-install-zdiid0g3/mysqlclient_87a039d3b25c4c3f8c32778ba1e13516/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/f2/r4cvtlb53hb3r3bvpzkmqnyr0000gn/T/pip-record-bh773nfm/install-record.txt --single-version-externally-managed --compile --install-headers /Users/pierro/Documents/permacool/api_permacool/include/site/python3.8/mysqlclient
cwd: /private/var/folders/f2/r4cvtlb53hb3r3bvpzkmqnyr0000gn/T/pip-install-zdiid0g3/mysqlclient_87a039d3b25c4c3f8c32778ba1e13516/
Complete output (43 lines):
mysql_config --version
['8.0.28']
mysql_config --libs
['-L/opt/homebrew/opt/mysql-client/lib', '-lmysqlclient', '-lz', '-lzstd', '-lssl', '-lcrypto', '-lresolv']
mysql_config --cflags
['-I/opt/homebrew/opt/mysql-client/include/mysql']
ext_options:
library_dirs: ['/opt/homebrew/opt/mysql-client/lib']
libraries: ['mysqlclient', 'zstd', 'resolv']
extra_compile_args: ['-std=c99']
extra_link_args: []
include_dirs: ['/opt/homebrew/opt/mysql-client/include/mysql']
extra_objects: []
define_macros: [('version_info', "(2,0,3,'final',0)"), ('__version__', '2.0.3')]
running install
running build
running build_py
creating build
creating build/lib.macosx-10.14-arm64-3.8
creating build/lib.macosx-10.14-arm64-3.8/MySQLdb
copying MySQLdb/__init__.py -> build/lib.macosx-10.14-arm64-3.8/MySQLdb
copying MySQLdb/_exceptions.py -> build/lib.macosx-10.14-arm64-3.8/MySQLdb
copying MySQLdb/connections.py -> build/lib.macosx-10.14-arm64-3.8/MySQLdb
copying MySQLdb/converters.py -> build/lib.macosx-10.14-arm64-3.8/MySQLdb
copying MySQLdb/cursors.py -> build/lib.macosx-10.14-arm64-3.8/MySQLdb
copying MySQLdb/release.py -> build/lib.macosx-10.14-arm64-3.8/MySQLdb
copying MySQLdb/times.py -> build/lib.macosx-10.14-arm64-3.8/MySQLdb
creating build/lib.macosx-10.14-arm64-3.8/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.14-arm64-3.8/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.14-arm64-3.8/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.macosx-10.14-arm64-3.8/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.macosx-10.14-arm64-3.8/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.14-arm64-3.8/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.14-arm64-3.8/MySQLdb/constants
running build_ext
building 'MySQLdb._mysql' extension
creating build/temp.macosx-10.14-arm64-3.8
creating build/temp.macosx-10.14-arm64-3.8/MySQLdb
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Dversion_info=(2,0,3,'final',0) -D__version__=2.0.3 -I/opt/homebrew/opt/mysql-client/include/mysql -I/Users/pierro/Documents/permacool/api_permacool/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c MySQLdb/_mysql.c -o build/temp.macosx-10.14-arm64-3.8/MySQLdb/_mysql.o -std=c99
clang -bundle -undefined dynamic_lookup -arch arm64 -arch x86_64 -Wl,-headerpad,0x1000 build/temp.macosx-10.14-arm64-3.8/MySQLdb/_mysql.o -L/opt/homebrew/opt/mysql-client/lib -lmysqlclient -lzstd -lresolv -o build/lib.macosx-10.14-arm64-3.8/MySQLdb/_mysql.cpython-38-darwin.so
ld: library not found for -lzstd
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
----------------------------------------

It is all good. I just changed the version of mysql-client in the requirements.txt because the version I downloaded with Brew was older

Related

Error while installing mysqlclient in django project on cPanel

I've been trying to solve this problem for a couple of days. I am trying to put my Django project in a venv on cPanel and install mysqlclient. So after setting up my Python (version = 3.7.8) on Cpanel, I installed Django version 3.1.7 and mysqlclient from the terminal using pip install django and pip install mysqlclient. However when I try to install mysqlclient, this error pops out.
Using cached mysqlclient-2.0.3.tar.gz (88 kB)
Building wheels for collected packages: mysqlclient
Building wheel for mysqlclient (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/canggihmallmy/virtualenv/django_test/3.7/bin/python3.7_bin -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ct08p_k4/mysqlclient_5cd61bc8b4de40efb5731cfe082b4d65/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ct08p_k4/mysqlclient_5cd61bc8b4de40efb5731cfe082b4d65/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'bdist_wheel -d /tmp/pip-wheel-scx4wswm
cwd: /tmp/pip-install-ct08p_k4/mysqlclient_5cd61bc8b4de40efb5731cfe082b4d65/
Complete output (43 lines):
mysql_config --version
['10.0.38']
mysql_config --libs
['-L/usr/lib64', '-lmysqlclient', '-lpthread', '-lz', '-lm', '-ldl', '-lssl', '-lcrypto']
mysql_config --cflags
['-I/usr/include/mysql', '-I/usr/include/mysql/..']
ext_options:
library_dirs: ['/usr/lib64']
libraries: ['mysqlclient', 'pthread', 'm', 'dl']
extra_compile_args: ['-std=c99']
extra_link_args: []
include_dirs: ['/usr/include/mysql', '/usr/include/mysql/..']
extra_objects: []
define_macros: [('version_info', "(2,0,3,'final',0)"), ('__version__', '2.0.3')]
/opt/alt/python37/lib64/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/_exceptions.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-3.7/MySQLdb
creating build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
running build_ext
building 'MySQLdb._mysql' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/MySQLdb
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Dversion_info=(2,0,3,'final',0) -D__version__=2.0.3 -I/usr/include/mysql -I/usr/include/mysql/.. -I/opt/alt/python37/include/python3.7m -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-3.7/MySQLdb/_mysql.o -std=c99
unable to execute 'gcc': Permission denied
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for mysqlclient
Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
ERROR: Command errored out with exit status 1:
command: /home/canggihmallmy/virtualenv/django_test/3.7/bin/python3.7_bin -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ct08p_k4/mysqlclient_5cd61bc8b4de40efb5731cfe082b4d65/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ct08p_k4/mysqlclient_5cd61bc8b4de40efb5731cfe082b4d65/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"','"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-1wxueu88/install-record.txt --single-version-externally-managed --compile --install-headers /home/canggihmallmy/virtualenv/django_test/3.7/include/site/python3.7/mysqlclient
cwd: /tmp/pip-install-ct08p_k4/mysqlclient_5cd61bc8b4de40efb5731cfe082b4d65/
Complete output (43 lines):
mysql_config --version
['10.0.38']
mysql_config --libs
['-L/usr/lib64', '-lmysqlclient', '-lpthread', '-lz', '-lm', '-ldl', '-lssl', '-lcrypto']
mysql_config --cflags
['-I/usr/include/mysql', '-I/usr/include/mysql/..']
ext_options:
library_dirs: ['/usr/lib64']
libraries: ['mysqlclient', 'pthread', 'm', 'dl']
extra_compile_args: ['-std=c99']
extra_link_args: []
include_dirs: ['/usr/include/mysql', '/usr/include/mysql/..']
extra_objects: []
define_macros: [('version_info', "(2,0,3,'final',0)"), ('__version__', '2.0.3')]
/opt/alt/python37/lib64/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/_exceptions.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-3.7/MySQLdb
creating build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
running build_ext
building 'MySQLdb._mysql' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/MySQLdb
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Dversion_info=(2,0,3,'final',0) -D__version__=2.0.3 -I/usr/include/mysql -I/usr/include/mysql/.. -I/opt/alt/python37/include/python3.7m -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-3.7/MySQLdb/_mysql.o -std=c99
unable to execute 'gcc': Permission denied
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/canggihmallmy/virtualenv/django_test/3.7/bin/python3.7_bin -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ct08p_k4/mysqlclient_5cd61bc8b4de40efb5731cfe082b4d65/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ct08p_k4/mysqlclient_5cd61bc8b4de40efb5731cfe082b4d65/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-1wxueu88/install-record.txt --single-version-externally-managed --compile --install-headers /home/canggihmallmy/virtualenv/django_test/3.7/include/site/python3.7/mysqlclient Check the logs for full command output. ```
I have tried some of the guide from , such as `yum install mysql` and sudo commands but to no avail.
Please help.
I had the same problem. After days of research I found this solution. I hope this works with your problem too.
Terminal
pip install mysql-connector-python
settings.py
DATABASES = {
'default': {
'NAME': 'DATEBASE_NAME',
'ENGINE': 'mysql.connector.django',
'USER': 'USERNAME',
'PASSWORD': 'PASSWORD',
'OPTIONS': {
'autocommit': True,
},
}
}
Terminal
python manage.py makemigrations
python manage.py migrate

Error in installing mysqlclient on mac with python 3.6

I am facing below issue in python while installing mysqlclient:
Building wheel for mysqlclient (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Users/joy/workspace/my_project/venv/bin/python -u -c 'import sys, setuptools,
tokenize; sys.argv[0] = '"'"'/private/var/folders/rz/qj7p_p1n2d38w4ysr50qvgfc0000gp/T/pip-
install-tfjwlop6/mysqlclient/setup.py'"'"';
__file__='"'"'/private/var/folders/rz/qj7p_p1n2d38w4ysr50qvgfc0000gp/T/pip-install-
tfjwlop6/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open).
(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code,
__file__, '"'"'exec'"'"'))' bdist_wheel -d
/private/var/folders/rz/qj7p_p1n2d38w4ysr50qvgfc0000gp/T/pip-wheel-s9xhvytf
cwd: /private/var/folders/rz/qj7p_p1n2d38w4ysr50qvgfc0000gp/T/pip-install-
tfjwlop6/mysqlclient/
Complete output (30 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.6
copying _mysql_exceptions.py -> build/lib.macosx-10.9-x86_64-3.6
creating build/lib.macosx-10.9-x86_64-3.6/MySQLdb
copying MySQLdb/__init__.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
copying MySQLdb/compat.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
copying MySQLdb/connections.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
copying MySQLdb/converters.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
copying MySQLdb/cursors.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
copying MySQLdb/release.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
copying MySQLdb/times.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
creating build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.9-x86_64-
3.6/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.macosx-10.9-x86_64-3.6
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -
fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -g -Dversion_info=(1,3,13,'final',0) -
D__version__=1.3.13 -I/usr/local/Cellar/mysql#5.7/5.7.29/include/mysql -
I/Users/joy/workspace/my_project/venv/include -
I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c _mysql.c -o
build/temp.macosx-10.9-x86_64-3.6/_mysql.o
gcc -bundle -undefined dynamic_lookup -arch x86_64 -g build/temp.macosx-10.9-x86_64-
3.6/_mysql.o -L/usr/local/Cellar/mysql#5.7/5.7.29/lib -lmysqlclient -lssl -lcrypto -o
build/lib.macosx-10.9-x86_64-3.6/_mysql.cpython-36m-darwin.so
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for mysqlclient
In this regard, I have gone though a several posts here, but not getting any clue regarding how to fix this on my mac.
You haven't got the gcc compiler installed. It comes with "Command line tools voor XCode" if I'm correct. So all you have to do is go to the app store and download XCode.
You can check if its installed by running gcc -v in the terminal.

Unable to install mysqlclient using pip (Ubuntu 18.04 LTS)

While installing mysqlclient using pip3 install mysqlclient I am geting an error "Failed building wheel for mysqlclient".
I tried using sudo apt-get install python3.6-dev libmysqlclient-dev but didn't work. I am using ubuntu 18.04.2 LTS and python 3.6.8. I was trying to install the mysqlclient in a virtual env.
The mysql server is working fine. I used the same method to install on a local windows machine and it worked fine but i can seem to make it work on server. Any ideas on why this happening. Any suggestions will be appreciated.
Error
Collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/d0/97/7326248ac8d5049968bf4ec708a5d3d4806e412a42e74160d7f266a3e03a/mysqlclient-1.4.6.tar.gz
Building wheels for collected packages: mysqlclient
Building wheel for mysqlclient (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/abhishek/Django/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-cl9xqcgy/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-cl9xqcgy/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-345d65je --python-tag cp36
cwd: /tmp/pip-install-cl9xqcgy/mysqlclient/
Complete output (31 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/_exceptions.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/compat.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-3.6/MySQLdb
creating build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
running build_ext
building 'MySQLdb._mysql' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/MySQLdb
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Dversion_info=(1,4,6,'final',0) -D__version__=1.4.6 -I/usr/include/mysql -I/usr/include/python3.6m -I/home/abhishek/Django/include/python3.6m -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-3.6/MySQLdb/_mysql.o
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/MySQLdb/_mysql.o -lmysqlclient -lpthread -lz -lm -lrt -latomic -lssl -lcrypto -ldl -o build/lib.linux-x86_64-3.6/MySQLdb/_mysql.cpython-36m-x86_64-linux-gnu.so
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for mysqlclient
Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
ERROR: Command errored out with exit status 1:
command: /home/abhishek/Django/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-cl9xqcgy/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-cl9xqcgy/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 /tmp/pip-record-m81sgzux/install-record.txt --single-version-externally-managed --compile --install-headers /home/abhishek/Django/include/site/python3.6/mysqlclient
cwd: /tmp/pip-install-cl9xqcgy/mysqlclient/
Complete output (31 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/_exceptions.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/compat.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-3.6/MySQLdb
creating build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
running build_ext
building 'MySQLdb._mysql' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/MySQLdb
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Dversion_info=(1,4,6,'final',0) -D__version__=1.4.6 -I/usr/include/mysql -I/usr/include/python3.6m -I/home/abhishek/Django/include/python3.6m -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-3.6/MySQLdb/_mysql.o
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/MySQLdb/_mysql.o -lmysqlclient -lpthread -lz -lm -lrt -latomic -lssl -lcrypto -ldl -o build/lib.linux-x86_64-3.6/MySQLdb/_mysql.cpython-36m-x86_64-linux-gnu.so
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/abhishek/Django/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-cl9xqcgy/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-cl9xqcgy/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 /tmp/pip-record-m81sgzux/install-record.txt --single-version-externally-managed --compile --install-headers /home/abhishek/Django/include/site/python3.6/mysqlclient Check the logs for full command output.
The actual error is here:
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
That means you do not have SSL development headers installed. You can install them like this:
sudo apt-get install libssl-dev
It worked on Windows because PyPI has binary packages available for Windows. There are no binary packages for Linux, so pip has to compile from source, which requires the development headers.

Issue with psutil package deployment in Python 3.6 virtual environment for Apache Airflow ML framework setup

I am trying to install an Apache Airflow based Machine Learning framework in a Python Virtual Environment in Mac OS. This ML framework is based on Apache Airflow version 1.9. I have configured a Python 3.6 virtual environment for this purpose. However, the ML framework installation and setup are failing due to the following error. Has anyone of you faced similar errors in Apache Airflow setup or Python 3.6 based virtual environments?
Running setup.py install for psutil ... error
ERROR: Command errored out with exit status 1:
command: /Users/gokulalex/airflow/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/79/sh378bcd1n15fyw44lvjnml40000gn/T/pip-install-ye9ohe71/psutil/setup.py'"'"'; __file__='"'"'/private/var/folders/79/sh378bcd1n15fyw44lvjnml40000gn/T/pip-install-ye9ohe71/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/79/sh378bcd1n15fyw44lvjnml40000gn/T/pip-record-anu_rweq/install-record.txt --single-version-externally-managed --compile --install-headers /Users/gokulalex/airflow/bin/../include/site/python3.6/psutil
cwd: /private/var/folders/79/sh378bcd1n15fyw44lvjnml40000gn/T/pip-install-ye9ohe71/psutil/
Complete output (45 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-3.6
creating build/lib.macosx-10.6-intel-3.6/psutil
copying psutil/_pswindows.py -> build/lib.macosx-10.6-intel-3.6/psutil
copying psutil/_common.py -> build/lib.macosx-10.6-intel-3.6/psutil
copying psutil/__init__.py -> build/lib.macosx-10.6-intel-3.6/psutil
copying psutil/_psosx.py -> build/lib.macosx-10.6-intel-3.6/psutil
copying psutil/_psbsd.py -> build/lib.macosx-10.6-intel-3.6/psutil
copying psutil/_pslinux.py -> build/lib.macosx-10.6-intel-3.6/psutil
copying psutil/_compat.py -> build/lib.macosx-10.6-intel-3.6/psutil
copying psutil/_psposix.py -> build/lib.macosx-10.6-intel-3.6/psutil
copying psutil/_pssunos.py -> build/lib.macosx-10.6-intel-3.6/psutil
creating build/lib.macosx-10.6-intel-3.6/psutil/tests
copying psutil/tests/runner.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
copying psutil/tests/test_misc.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
copying psutil/tests/test_posix.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
copying psutil/tests/test_linux.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
copying psutil/tests/test_sunos.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
copying psutil/tests/__init__.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
copying psutil/tests/test_process.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
copying psutil/tests/test_bsd.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
copying psutil/tests/test_system.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
copying psutil/tests/test_osx.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
copying psutil/tests/test_memory_leaks.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
copying psutil/tests/test_windows.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
running build_ext
building 'psutil._psutil_osx' extension
creating build/temp.macosx-10.6-intel-3.6
creating build/temp.macosx-10.6-intel-3.6/psutil
creating build/temp.macosx-10.6-intel-3.6/psutil/arch
creating build/temp.macosx-10.6-intel-3.6/psutil/arch/osx
/usr/local/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=442 -DPSUTIL_OSX=1 -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c psutil/_psutil_osx.c -o build/temp.macosx-10.6-intel-3.6/psutil/_psutil_osx.o
/usr/local/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=442 -DPSUTIL_OSX=1 -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c psutil/_psutil_common.c -o build/temp.macosx-10.6-intel-3.6/psutil/_psutil_common.o
/usr/local/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=442 -DPSUTIL_OSX=1 -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c psutil/arch/osx/process_info.c -o build/temp.macosx-10.6-intel-3.6/psutil/arch/osx/process_info.o
/usr/local/bin/clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g build/temp.macosx-10.6-intel-3.6/psutil/_psutil_osx.o build/temp.macosx-10.6-intel-3.6/psutil/_psutil_common.o build/temp.macosx-10.6-intel-3.6/psutil/arch/osx/process_info.o -o build/lib.macosx-10.6-intel-3.6/psutil/_psutil_osx.cpython-36m-darwin.so -framework CoreFoundation -framework IOKit
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//IOKit.framework/IOKit.tbd and library file /System/Library/Frameworks//IOKit.framework/IOKit are out of sync. Falling back to library file for linking.
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ignoring file /usr/local/Cellar/llvm#4/4.0.1_1/bin/../lib/clang/4.0.1/lib/darwin/libclang_rt.osx.a, missing required architecture i386 in file /usr/local/Cellar/llvm#4/4.0.1_1/bin/../lib/clang/4.0.1/lib/darwin/libclang_rt.osx.a (2 slices)
ld: in '/usr/local/lib/libunwind.dylib', file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libunwind.dylib for architecture i386
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/local/bin/clang' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/gokulalex/airflow/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/79/sh378bcd1n15fyw44lvjnml40000gn/T/pip-install-ye9ohe71/psutil/setup.py'"'"'; __file__='"'"'/private/var/folders/79/sh378bcd1n15fyw44lvjnml40000gn/T/pip-install-ye9ohe71/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/79/sh378bcd1n15fyw44lvjnml40000gn/T/pip-record-anu_rweq/install-record.txt --single-version-externally-managed --compile --install-headers /Users/gokulalex/airflow/bin/../include/site/python3.6/psutil Check the logs for full command output.
Though I haven't gotten this error before, it looks like you might be missing some c headers which are important for this. Also please check your airflow installation to see if you are missing. From going through your debug log this error doesn't seem to be related to Python

ubuntu 16.04 python 3.7.4 pip mysqlclient error [duplicate]

This question already has answers here:
setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 [closed]
(38 answers)
Closed 3 years ago.
I want to install mysqlclient in my ubuntu server.
python version is 3.7.4.
But I can't install this package.(It installed well in 3.6.5)
This is Error message.
(tmp) ubuntu#orcinus:~$ pip install mysqlclient
Collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/4d/38/c5f8bac9c50f3042c8f05615f84206f77f03db79781db841898fde1bb284/mysqlclient-1.4.4.tar.gz
Building wheels for collected packages: mysqlclient
Building wheel for mysqlclient (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/ubuntu/tmp/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4oxpmvqx/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4oxpmvqx/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-1lcdb63b --python-tag cp37
cwd: /tmp/pip-install-4oxpmvqx/mysqlclient/
Complete output (29 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/_exceptions.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/compat.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-3.7/MySQLdb
creating build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
running build_ext
building 'MySQLdb._mysql' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/MySQLdb
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Dversion_info=(1,4,4,'final',0) -D__version__=1.4.4 -I/usr/include/mysql -I/usr/include/python3.7m -I/home/ubuntu/tmp/include/python3.7m -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-3.7/MySQLdb/_mysql.o
MySQLdb/_mysql.c:38:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for mysqlclient
Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
ERROR: Command errored out with exit status 1:
command: /home/ubuntu/tmp/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4oxpmvqx/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4oxpmvqx/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 /tmp/pip-record-1f31t3fb/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/tmp/include/site/python3.7/mysqlclient
cwd: /tmp/pip-install-4oxpmvqx/mysqlclient/
Complete output (29 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/_exceptions.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/compat.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-3.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-3.7/MySQLdb
creating build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.7/MySQLdb/constants
running build_ext
building 'MySQLdb._mysql' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/MySQLdb
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Dversion_info=(1,4,4,'final',0) -D__version__=1.4.4 -I/usr/include/mysql -I/usr/include/python3.7m -I/home/ubuntu/tmp/include/python3.7m -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-3.7/MySQLdb/_mysql.o
MySQLdb/_mysql.c:38:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/ubuntu/tmp/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4oxpmvqx/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4oxpmvqx/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 /tmp/pip-record-1f31t3fb/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/tmp/include/site/python3.7/mysqlclient Check the logs for full command output.
What should I do?
I must use mysqlclient not pymysql.
Stackoverflow says add some more details.. but I don't know what should I add more.
Thank you.
You need to install python version specific python-dev. In your case you need to install python-dev for python3.7
sudo apt-get install python3.7-dev
source
install this:
sudo apt-get install python3-dev

Categories