Using cached mysqlclient-1.3.0.tar.gz (76 kB)
ERROR: Command errored out with exit status 1:
command: /Users/mr.sallam/.local/share/virtualenvs/Admission_System-h6ReVRNX/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/58/khmzr9l90hx237729cjz2ct00000gn/T/pip-install-cn6qvsqm/mysqlclient_c82e6a9eeefe4d66bf9960f11336d0db/setup.py'"'"'; __file__='"'"'/private/var/folders/58/khmzr9l90hx237729cjz2ct00000gn/T/pip-install-cn6qvsqm/mysqlclient_c82e6a9eeefe4d66bf9960f11336d0db/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/58/khmzr9l90hx237729cjz2ct00000gn/T/pip-pip-egg-info-186pdzul
cwd: /private/var/folders/58/khmzr9l90hx237729cjz2ct00000gn/T/pip-install-cn6qvsqm/mysqlclient_c82e6a9eeefe4d66bf9960f11336d0db/
Complete output (10 lines):
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/58/khmzr9l90hx237729cjz2ct00000gn/T/pip-install-cn6qvsqm/mysqlclient_c82e6a9eeefe4d66bf9960f11336d0db/setup.py", line 17, in <module>
metadata, options = get_config()
File "/private/var/folders/58/khmzr9l90hx237729cjz2ct00000gn/T/pip-install-cn6qvsqm/mysqlclient_c82e6a9eeefe4d66bf9960f11336d0db/setup_posix.py", line 47, in get_config
libs = mysql_config("libs_r")
File "/private/var/folders/58/khmzr9l90hx237729cjz2ct00000gn/T/pip-install-cn6qvsqm/mysqlclient_c82e6a9eeefe4d66bf9960f11336d0db/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
ERROR: No matching distribution found for mysqlclient
As per the readme for mysqlclient, on macOS you will need to install mysql or mysql-client:
# Assume you are activating Python 3 venv
$ brew install mysql
$ pip install mysqlclient
If you don't want to install MySQL server, you can use mysql-client instead:
# Assume you are activating Python 3 venv
$ brew install mysql-client
$ echo 'export PATH="/usr/local/opt/mysql-client/bin:$PATH"' >> ~/.bash_profile
$ export PATH="/usr/local/opt/mysql-client/bin:$PATH"
$ pip install mysqlclient
On Mac
brew install mysql
Reference:
https://dev.mysql.com/doc/connector-python/en/connector-python-installation-binary.html
https://dev.mysql.com/doc/mysql-osx-excerpt/5.7/en/osx-installation-pkg.html
Have you considered installing pymysql, a pure Python MySQL driver?
Also, since it is purely pythonic, it is quite more cross compatible than c based MySQL connectors.
From terminal
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
brew update
HOMEBREW_NO_ENV_FILTERING=1 ACCEPT_EULA=Y brew install msodbcsql17 mssql-tools
Related
I tried:
pip3 install -r requirements.txt
Here's the error I received:
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\Admin\AppData\Local\Temp\pip-install-6c3rea1s\pycocotools\
You are using pip version 19.0.3, however version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip'
command.
So, I tried:
pip install --upgrade pip
and
install pip3 install -r requirements.txt
That resulted in more errors:
ERROR: Command errored out with exit status 1: command:
'c:\users\admin\appdata\local\programs\python\python37-32\python.exe'
-c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-epmkeh4g\\pycocotools\\setup.py'"'"';
__file__='"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-epmkeh4g\\pycocotools\\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
'C:\Users\Admin\AppData\Local\Temp\pip-install-epmkeh4g\pycocotools\pip-egg-info'
cwd:
C:\Users\Admin\AppData\Local\Temp\pip-install-epmkeh4g\pycocotools\
Complete output (5 lines): Traceback (most recent call last):
File "<string>", line 1, in <module> File
"C:\Users\Admin\AppData\Local\Temp\pip-install-epmkeh4g\pycocotools\setup.py",
line 2, in <module> from Cython.Build import cythonize
ModuleNotFoundError: No module named 'Cython'
---------------------------------------- ERROR: Command errored out
with exit status 1: python setup.py egg_info Check the logs for full
command output.
I deleted the folder and re-install, but the results remained the same.
This is a bug in pycocotools. The bug was fixed in 2017 but it seems the fix didn't get into release 2.0 in 2018 (I guess the release process is also buggy).
There is also another similar bug in setup.py — it imports numpy before installing it.
There is no simple workarounds for these bugs using requirements.txt. You need to install the required modules before installing pycocotools:
pip install Cython numpy
pip install -r requirements.txt
I'm currently working on a project using Django with python2.7 but each time I try pip install mysqsl I get this error messages
"" ERROR: Command errored out with exit status 1:
command: 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/jb/4wfxz94x599f8rnhtgkbs92c0000gn/T/pip-install-FpxjOl/mysql-python/setup.py'"'"'; __file__='"'"'/private/var/folders/jb/4wfxz94x599f8rnhtgkbs92c0000gn/T/pip-install-FpxjOl/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/jb/4wfxz94x599f8rnhtgkbs92c0000gn/T/pip-install-FpxjOl/mysql-python/pip-egg-info
cwd: /private/var/folders/jb/4wfxz94x599f8rnhtgkbs92c0000gn/T/pip-install-FpxjOl/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/jb/4wfxz94x599f8rnhtgkbs92c0000gn/T/pip-install-FpxjOl/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.""
Any help please
Most likely you have not installed mysql on your machine.
MySQLdb is a python interface for mysql, but it is not mysql itself. And apparently MySQLdb needs the command 'mysql_config', so you need to install that first.
You can install MySQL with brew.
xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Once you have brew installed:
brew install mysql
brew link mysql
pip install MySQL-python
I have venv activated using conda
$source activate /home/sim/anaconda3/envs/myenv
I am in venv (myenv) sim#ma-Vostro-15-3568:~/flask/venv$
python3 -m pip install psycopg2
i have tried pip3 also
python --version is 3.6
Error is below
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1:
command: /home/mak/anaconda3/envs/myenv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7ql73mks/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-7ql73mks/psycopg2/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-7ql73mks/psycopg2/pip-egg-info
cwd: /tmp/pip-install-7ql73mks/psycopg2/
Complete output (23 lines):
running egg_info
creating /tmp/pip-install-7ql73mks/psycopg2/pip-egg-info/psycopg2.egg-info
writing /tmp/pip-install-7ql73mks/psycopg2/pip-egg-info/psycopg2.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-install-7ql73mks/psycopg2/pip-egg-info/psycopg2.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-install-7ql73mks/psycopg2/pip-egg-info/psycopg2.egg-info/top_level.txt
writing manifest file '/tmp/pip-install-7ql73mks/psycopg2/pip-egg-info/psycopg2.egg-info/SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).
According to error message, you can either 1. specify path, or 2. install psycopg2-binary using the command: pip3 install psycopg2-binary
Try this
sudo apt install libpq-dev python3-dev
Get help from LINK
Im trying to install Halo by using,
pip install halo
I get the following error message:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/9s/vjh90rsn4xl5587hr11qpjjh0000gn/T/pip-install-L5LD_D/halo/setup.py'"'"'; __file__='"'"'/private/var/folders/9s/vjh90rsn4xl5587hr11qpjjh0000gn/T/pip-install-L5LD_D/halo/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/9s/vjh90rsn4xl5587hr11qpjjh0000gn/T/pip-install-L5LD_D/halo/pip-egg-info
cwd: /private/var/folders/9s/vjh90rsn4xl5587hr11qpjjh0000gn/T/pip-install-L5LD_D/halo/
Complete output (3 lines):
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
error in halo setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected ',' or end-of-list in backports.shutil_get_terminal_size>=1.0.0;python_version < '3.3' at ;python_version < '3.3'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
My python version is 2.7.10.
I made some research and tried the following solutions,
brew install halo
This did not work and my terminal returned:
Error: No formulae found in taps.
I checked my Formulae in Homebrew and could not find Halo. However, I found other packages so my Homebrew work otherwise.
I tried chaning my python version to 3 by changing alias and installing halo again, and it did not work either.
alias python='python3'
Error massage was the same as for python2, as above.
I need halo for a school lab, and im using Mac.
It looks like it's a known bug for that package:
https://github.com/manrajgrover/halo/issues/79
You just have to update setup tools via: pip install -U setuptools
If that doesn't work, try adding the --user flag: pip install --user -U setuptools
Try this command
pip3 install --user package-name # for Python3
pip install -U setuptools && pip install halo # for Python3
pip install --user package-name # for Python2
pip3 install -U setuptools && pip install halo # for Python2
I am new to Python, coming from Java and JS background,
I've installed Python and Pip in my local machine,
I am trying to learn Django, using MySQL,
But I am unable to install the mysqlclient using pip,
I used the following command to do so -
pip install mysqlclient
It's giving the following error -
Collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/4d/38/c5f8bac9c50f3042c8f05615f84206f77f03db79781db841898fde1bb284/mysqlclient-1.4.4.tar.gz
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ms/q8s67d8n09q59mbpshz3dq9m0000gn/T/pip-install-nk55db_s/mysqlclient/setup.py'"'"'; __file__='"'"'/private/var/folders/ms/q8s67d8n09q59mbpshz3dq9m0000gn/T/pip-install-nk55db_s/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/ms/q8s67d8n09q59mbpshz3dq9m0000gn/T/pip-install-nk55db_s/mysqlclient/
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 "<string>", line 1, in <module>
File "/private/var/folders/ms/q8s67d8n09q59mbpshz3dq9m0000gn/T/pip-install-nk55db_s/mysqlclient/setup.py", line 16, in <module>
metadata, options = get_config()
File "/private/var/folders/ms/q8s67d8n09q59mbpshz3dq9m0000gn/T/pip-install-nk55db_s/mysqlclient/setup_posix.py", line 61, in get_config
libs = mysql_config("libs")
File "/private/var/folders/ms/q8s67d8n09q59mbpshz3dq9m0000gn/T/pip-install-nk55db_s/mysqlclient/setup_posix.py", line 29, in mysql_config
raise EnvironmentError("%s not found" % (_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.
Screenshot -
I am solve error following process
Python 3.8.0
First install in Homebraw type following command. type this command in terminal
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install mariadb-connector-c
pip install mysqlclient
more issues follow this tutorial
https://medium.com/#MrWeeble/homebrew-on-mac-and-pythons-mysqlclient-ea44fa300e70
mysqlclient requires additional c libraires.
For linux (Debian):
$ sudo apt-get install python3-dev default-libmysqlclient-dev build-essential
For Mac:
$ brew install mysql
Further reading at the home page