pip installations issues on MacOS with new m1 chip - python

I just switched from Windows to Mac and cloned my repository. I have the Mac Mini 2020 with the new m1 chip.
I ran pip3 install -r requirements.txt and got the following error:
ERROR: Command errored out with exit status 1:
command: /Library/Developer/CommandLineTools/usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/t9/czy9qvr930l9s46j8b9k__th0000gp/T/pip-install-npqzencr/mysqlclient/setup.py'"'"'; __file__='"'"'/private/var/folders/t9/czy9qvr930l9s46j8b9k__th0000gp/T/pip-install-npqzencr/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: /private/var/folders/t9/czy9qvr930l9s46j8b9k__th0000gp/T/pip-install-npqzencr/mysqlclient/
Complete output (15 lines):
/bin/sh: mysql_config: command not found
/bin/sh: mariadb_config: command not found
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/t9/czy9qvr930l9s46j8b9k__th0000gp/T/pip-install-npqzencr/mysqlclient/setup.py", line 15, in <module>
metadata, options = get_config()
File "/private/var/folders/t9/czy9qvr930l9s46j8b9k__th0000gp/T/pip-install-npqzencr/mysqlclient/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "/private/var/folders/t9/czy9qvr930l9s46j8b9k__th0000gp/T/pip-install-npqzencr/mysqlclient/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
mysql_config --version
mariadb_config --version
mysql_config --libs
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I tried with sudo after seeing another post about this issue:
sudo pip3 install -r requirements.txt and got this error:
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-jqyr1k_y/mysqlclient_c6d45690ebfd45cdbd081164dcfad4ce/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-jqyr1k_y/mysqlclient_c6d45690ebfd45cdbd081164dcfad4ce/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'"'"'))' egg_info --egg-base /private/tmp/pip-pip-egg-info-h6hpe889
cwd: /private/tmp/pip-install-jqyr1k_y/mysqlclient_c6d45690ebfd45cdbd081164dcfad4ce/
Complete output (15 lines):
/bin/sh: mysql_config: command not found
/bin/sh: mariadb_config: command not found
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-install-jqyr1k_y/mysqlclient_c6d45690ebfd45cdbd081164dcfad4ce/setup.py", line 15, in <module>
metadata, options = get_config()
File "/private/tmp/pip-install-jqyr1k_y/mysqlclient_c6d45690ebfd45cdbd081164dcfad4ce/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "/private/tmp/pip-install-jqyr1k_y/mysqlclient_c6d45690ebfd45cdbd081164dcfad4ce/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
mysql_config --version
mariadb_config --version
mysql_config --libs
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/3c/df/59cd2fa5e48d0804d213bdcb1acb4d08c403b61c7ff7ed4dd4a6a2deb3f7/mysqlclient-2.0.3.tar.gz#sha256=f6ebea7c008f155baeefe16c56cd3ee6239f7a5a9ae42396c2f1860f08a7c432 (from https://pypi.org/simple/mysqlclient/) (requires-python:>=3.5). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement mysqlclient==2.0.3 (from versions: 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11rc1, 1.3.11, 1.3.12, 1.3.13, 1.3.14, 1.4.0rc1, 1.4.0rc2, 1.4.0rc3, 1.4.0, 1.4.1, 1.4.2, 1.4.2.post1, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 2.0.0, 2.0.1, 2.0.2, 2.0.3)
ERROR: No matching distribution found for mysqlclient==2.0.3
Versions:
Python 2.7.16
pip 19.2.3
When I run check my pip version it clearly shows python 3.8 there:
pip3 --version
pip 19.2.3 from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pip (python 3.8)
Any tips would be LOVELY!

I’ve also had similar experience with M1. I think it’s due to the mysql config. So first of all locate where your mysql_config is ( it can either be in /opt or /bin directories). For instance mine is in:
/opt/homebrew/bin
Once you’ve found the file, you need to edit the file with your favorite editor (I use nano) and change this line in the configuration:
# Create options
libs="-L$pkglibdir"
libs="$libs -l "
change it to this:
# Create options
libs="-L$pkglibdir"
libs="$libs -lmysqlclient -lssl -lcrypto"
after editing install mysqlclient again. You can also ensure that gcc is already installed on your Mac

Related

Unable to install mysqlclient on ubuntu using pip

I have a following problem. I would like to install MySQLdb. I try pip install mysqlclient but I got this error message:
Collecting mysqlclient
Using cached mysqlclient-2.1.1.tar.gz (88 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ydedt20p/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ydedt20p/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-ydedt20p/mysqlclient/pip-egg-info
cwd: /tmp/pip-install-ydedt20p/mysqlclient/
Complete output (15 lines):
/bin/sh: 1: mysql_config: not found
/bin/sh: 1: mariadb_config: not found
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-ydedt20p/mysqlclient/setup.py", line 15, in <module>
metadata, options = get_config()
File "/tmp/pip-install-ydedt20p/mysqlclient/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-ydedt20p/mysqlclient/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
mysql_config --version
mariadb_config --version
mysql_config --libs
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I am using Python 3.8 on Ubuntu. How can I fix it, please?
Please read and follow the installation instructions for Linux.
For Ubuntu,
sudo apt-get install python3-dev default-libmysqlclient-dev build-essential
to install the required libraries before attempting to
pip install mysqlclient

Unable to install mysqlclient with pip on ubuntu [duplicate]

This question already has answers here:
pip install mysql-python fails with EnvironmentError: mysql_config not found
(24 answers)
mysql_config not found when installing mysqldb python interface
(36 answers)
Closed 1 year ago.
I'm trying to install mysqlclient on Ubuntu 20.04LTS, the main error is: mysql_config not found.
Whole Error:
$ pip3 install mysqlclient==2.0.3
Defaulting to user installation because normal site-packages is not writeable
Collecting mysqlclient==2.0.3
Using cached mysqlclient-2.0.3.tar.gz (88 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qr1hc7jz/mysqlclient_1ff152ec2d5d4f14a4e282285faeb229/setup.py'"'"'; _file__='"'"'/tmp/pip-install-qr1hc7jz/mysqlclient_1ff152ec2d5d4f14a4e282285faeb229/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'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ehrlbbbl
cwd: /tmp/pip-install-qr1hc7jz/mysqlclient_1ff152ec2d5d4f14a4e282285faeb229/
Complete output (15 lines):
/bin/sh: 1: mysql_config: not found
/bin/sh: 1: mariadb_config: not found
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-qr1hc7jz/mysqlclient_1ff152ec2d5d4f14a4e282285faeb229/setup.py", line 15, in <module>
metadata, options = get_config()
File "/tmp/pip-install-qr1hc7jz/mysqlclient_1ff152ec2d5d4f14a4e282285faeb229/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-qr1hc7jz/mysqlclient_1ff152ec2d5d4f14a4e282285faeb229/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
mysql_config --version
mariadb_config --version
mysql_config --libs
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/3c/df/59cd2fa5e48d0804d213bdcb1acb4d08c403b61c7ff7ed4dd4a6a2deb3f7/mysqlclient-2.0.3.tar.gz#sha256=f6ebea7c008f155baeefe16c56cd3ee6239f7a5a9ae42396c2f1860f08a7c432 (from https://pypi.org/simple/mysqlclient/) (requires-python:>=3.5). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement mysqlclient==2.0.3 (from versions: 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11rc1, 1.3.11, 1.3.12, 1.3.13, 1.3.14, 1.4.0rc1, 1.4.0rc2, 1.4.0rc3, 1.4.0, 1.4.1, 1.4.2, 1.4.2.post1, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0rc1, 2.1.0)
ERROR: No matching distribution found for mysqlclient==2.0.3
(when trying to pip3 install mysqlclient, the same error apears, but every version tries to install)
You need to install the python3 and MySQL development headers and libraries like in your ubuntu OS,
sudo apt-get install python3-dev default-libmysqlclient-dev build-essential
then install using
pip3 install mysqlclient==2.0.3
I hope this will help you out

I can't install mysqlclient using `pip install mysqlclient` command

Here is the console log after ran pip install mysqlclient command.
`(venv) Yu:sagemaker-modeltraining lee$ pip install mysqlclient
Collecting mysqlclient
Using cached mysqlclient-2.0.3.tar.gz (88 kB)
ERROR: Command errored out with exit status 1:
command: '/Volumes/Work Series/bloc-x/sagemaker/sagemaker-modeltraining/venv/bin/python' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_bfe6faaff6334a44b5df618fa8de82f2/setup.py'"'"'; file='"'"'/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_bfe6faaff6334a44b5df618fa8de82f2/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'"'"'))' egg_info --egg-base /private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-pip-egg-info-lnpozcvn
cwd: /private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_bfe6faaff6334a44b5df618fa8de82f2/
Complete output (15 lines):
/bin/sh: mysql_config: command not found
/bin/sh: mariadb_config: command not found
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_bfe6faaff6334a44b5df618fa8de82f2/setup.py", line 15, in
metadata, options = get_config()
File "/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_bfe6faaff6334a44b5df618fa8de82f2/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_bfe6faaff6334a44b5df618fa8de82f2/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
mysql_config --version
mariadb_config --version
mysql_config --libs
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/3c/df/59cd2fa5e48d0804d213bdcb1acb4d08c403b61c7ff7ed4dd4a6a2deb3f7/mysqlclient-2.0.3.tar.gz#sha256=f6ebea7c008f155baeefe16c56cd3ee6239f7a5a9ae42396c2f1860f08a7c432 (from https://pypi.org/simple/mysqlclient/) (requires-python:>=3.5). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached mysqlclient-2.0.2.tar.gz (88 kB)
ERROR: Command errored out with exit status 1:
command: '/Volumes/Work Series/bloc-x/sagemaker/sagemaker-modeltraining/venv/bin/python' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_850f20e68f9b4a9c8db506f4494ef12b/setup.py'"'"'; file='"'"'/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_850f20e68f9b4a9c8db506f4494ef12b/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'"'"'))' egg_info --egg-base /private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-pip-egg-info-cl3w1t3z
cwd: /private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_850f20e68f9b4a9c8db506f4494ef12b/
Complete output (12 lines):
/bin/sh: mysql_config: command not found
/bin/sh: mariadb_config: command not found
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_850f20e68f9b4a9c8db506f4494ef12b/setup.py", line 15, in
metadata, options = get_config()
File "/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_850f20e68f9b4a9c8db506f4494ef12b/setup_posix.py", line 65, in get_config
libs = mysql_config("libs")
File "/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_850f20e68f9b4a9c8db506f4494ef12b/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
----------------------------------------
enter code here
..........
..........
WARNING: Discarding https://files.pythonhosted.org/packages/6b/ba/4729d99e85a0a35bb46d55500570de05b4af10431cef174b6da9f58a0e50/mysqlclient-1.3.1.tar.gz#sha256=3549e8a61f10c8cd8eac6581d3f44d0594f535fb7b29e6090db3a0bc547b25ad (from https://pypi.org/simple/mysqlclient/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached mysqlclient-1.3.0.tar.gz (76 kB)
ERROR: Command errored out with exit status 1:
command: '/Volumes/Work Series/bloc-x/sagemaker/sagemaker-modeltraining/venv/bin/python' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_c4c84c03c6d84e2ba49d8978d8464e37/setup.py'"'"'; file='"'"'/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_c4c84c03c6d84e2ba49d8978d8464e37/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'"'"'))' egg_info --egg-base /private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-pip-egg-info-x9o75gw4
cwd: /private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_c4c84c03c6d84e2ba49d8978d8464e37/
Complete output (10 lines):
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_c4c84c03c6d84e2ba49d8978d8464e37/setup.py", line 17, in
metadata, options = get_config()
File "/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_c4c84c03c6d84e2ba49d8978d8464e37/setup_posix.py", line 47, in get_config
libs = mysql_config("libs_r")
File "/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_c4c84c03c6d84e2ba49d8978d8464e37/setup_posix.py", line 29, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
OSError: mysql_config not found
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/6a/91/bdfe808fb5dc99a5f65833b370818161b77ef6d1e19b488e4c146ab615aa/mysqlclient-1.3.0.tar.gz#sha256=06eb5664e3738b283ea2262ee60ed83192e898f019cc7ff251f4d05a564ab3b7 (from https://pypi.org/simple/mysqlclient/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement mysqlclient (from versions: 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11rc1, 1.3.11, 1.3.12, 1.3.13, 1.3.14, 1.4.0rc1, 1.4.0rc2, 1.4.0rc3, 1.4.0, 1.4.1, 1.4.2, 1.4.2.post1, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 2.0.0, 2.0.1, 2.0.2, 2.0.3)
ERROR: No matching distribution found for mysqlclient
`
my python version is 3.9.
I was going to use mysql database for my django backend.
here is the setting
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'messagebird',
'USER': 'root',
'PASSWORD': 'messagebird',
'HOST': '127.0.0.1',
'PORT': '3306',
}
}
I am not sure why this issue happens.
screenshot enter image description here
enter image description here
https://www.lfd.uci.edu/~gohlke/pythonlibs/ you can simply go in here and use Ctrl+F to find mysqlclient and download it for your machine now use pip install wheel the wheel once installed is available to run from the command line python -m wheel install path_to_the_downloaded_wheel_file now most probably the module will be installed
Pls try using following command lines
pip install path_to_the_downloaded_wheel_file
or
python -m pip install path_to_the_downloaded_wheel_file

Error to install MYSQLCLIENT python Linux

Im trying to install the mysqlclient on linux, and keeping reciving this error bellow.
I already tried update the:
sudo apt-get install build-essential
sudo apt-get install libssl-dev
And the error persit:
^C(venv) pip install mysqlclient
Collecting mysqlclient
Using cached mysqlclient-2.0.2.tar.gz (88 kB)
ERROR: Command errored out with exit status 1:
command: /home/felipecid/PycharmProjects/djangoAgenda/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ct6grj28/mysqlclient_e1f80e76b30f4edaaa24bdcfc6a54e18/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ct6grj28/mysqlclient_e1f80e76b30f4edaaa24bdcfc6a54e18/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-1wsevah8
cwd: /tmp/pip-install-ct6grj28/mysqlclient_e1f80e76b30f4edaaa24bdcfc6a54e18/
Complete output (12 lines):
/bin/sh: mysql_config: comando não encontrado
/bin/sh: mariadb_config: comando não encontrado
/bin/sh: mysql_config: comando não encontrado
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-ct6grj28/mysqlclient_e1f80e76b30f4edaaa24bdcfc6a54e18/setup.py", line 15, in <module>
metadata, options = get_config()
File "/tmp/pip-install-ct6grj28/mysqlclient_e1f80e76b30f4edaaa24bdcfc6a54e18/setup_posix.py", line 65, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-ct6grj28/mysqlclient_e1f80e76b30f4edaaa24bdcfc6a54e18/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
The problem is beacause im using the DISTR Linux Mint Version, just sawp for a regular Unbuntu version and works!

Problem installation of mysql instance of python

In mac OSX I have already installed mariadb 10.1.20 now while i Try to install mysql-python using pip install mysql-python system showing following error:
Collecting mysql-python
Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
ERROR: Command errored out with exit status 1:
command: /Users/eskimi/Development/ErpNext/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/1r/0z4_dp3j0237vqx1jvc0sn3c0000gp/T/pip-install-s0tXN_/mysql-python/setup.py'"'"'; __file__='"'"'/private/var/folders/1r/0z4_dp3j0237vqx1jvc0sn3c0000gp/T/pip-install-s0tXN_/mysql-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/1r/0z4_dp3j0237vqx1jvc0sn3c0000gp/T/pip-install-s0tXN_/mysql-python/pip-egg-info
cwd: /private/var/folders/1r/0z4_dp3j0237vqx1jvc0sn3c0000gp/T/pip-install-s0tXN_/mysql-python/
Complete output (10 lines):
sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/1r/0z4_dp3j0237vqx1jvc0sn3c0000gp/T/pip-install-s0tXN_/mysql-python/setup.py", line 17, in <module>
metadata, options = get_config()
File "setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
How can resolve this issue?
N.B I am using python 2.7

Categories

Resources