pip3 install mysql ERROR - python

I get this error
pi#teambaboy:~ $ pip3 install mysql
Collecting mysql
Downloading https://www.piwheels.org/simple/mysql/mysql-0.0.1-py3-none-any.whl
Collecting MySQL-python (from mysql)
Using cached MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-k38v3y9c/MySQL-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/tmp/pip-build-k38v3y9c/MySQL-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-k38v3y9c/MySQL-python/

Use mysqlclient instead. It's the modern drop-in replacement.
$ pip install mysqlclient

Related

Not able to pip install DAG package in python

I am getting an error while trying pip install DAG packcage.
Error
Collecting DAG
Using cached https://files.pythonhosted.org/packages/e1/92/ffc722ac557e3c180f8ec6cdad96d2731b981677529c263c3df04a656910/DAG-0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\ASHOK~1.EAP\AppData\Local\Temp\pip-install-4dybsujd\DAG\setup.py", line 1, in <module>
from ez_setup import use_setuptools
File "C:\Users\ASHOK~1.EAP\AppData\Local\Temp\pip-install-4dybsujd\DAG\ez_setup.py", line 94
except pkg_resources.VersionConflict, e:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\ASHOK~1.EAP\AppData\Local\Temp\pip-install-4dybsujd\DAG\
How to fix this.
Try pip install py-dag, this will use https://github.com/thieman/py-dag
DAG, released in 2007. The code is Python2-only.
Try installing the module with Python 2.7. Or find a different, Python3-compatible module.

Python error trying install mysql-connector via pip

I'm to trying create a project in Python using Django. One of the dependencies is a connection with Mysql. I'm Using pip to import whatever I need.
My problem is the error when I run this line: sudo pip3 install mysql-python
The return is:
Collecting mysql-python
Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-6dok9yt5/mysql-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/tmp/pip-install-6dok9yt5/mysql-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
The final line is: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-6dok9yt5/mysql-python/
Someone can help me? Thanks in advance!
As far as I know "mysql-python" currently does not support python3
MySQL-3.23 through 5.5 and Python-2.4 through 2.7 are currently supported. Python-3.0 will be supported in a future release. PyPy is supported.
Maybe this will help:
https://stackoverflow.com/a/25724855/966660

Python pip conflict for robotframework-selenium2library

I've tried to install robotframework-selenium2library but taken a pkg_resources.VersionConflict error:
Downloading/unpacking robotframework-selenium2library
Downloading robotframework-selenium2library-1.8.0.tar.gz (118kB): 118kB downloaded
Running setup.py (path:/tmp/pip_build_root/robotframework-selenium2library/setup.py) egg_info for package robotframework-selenium2library
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/robotframework-selenium2library/setup.py", line 7, in <module>
from ez_setup import use_setuptools
File "/tmp/pip_build_root/robotframework-selenium2library/src/ez_setup.py", line 106
except pkg_resources.VersionConflict, e:
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/robotframework-selenium2library/setup.py", line 7, in <module>
from ez_setup import use_setuptools
File "/tmp/pip_build_root/robotframework-selenium2library/src/ez_setup.py", line 106
except pkg_resources.VersionConflict, e:
^
SyntaxError: invalid syntax
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/robotframework-selenium2library
Storing debug log for failure in /root/.pip/pip.log
Not so many packages have been already installed:
pip list
> apparmor (2.9.4)
> LibAppArmor (2.9.4)
> pip (1.5.6)
> pygobject (3.14.0)
> robotframework (3.0.2)
> robotframework-databaselibrary (1.0.1)
> selenium (3.4.3)
> setuptools (3.6)
python --version
> Python 2.7.12
Does anybody know how to resolve that issue?
The version of robotframework-selenium2library at PyPI (1.8.0) is rather old and supports only Python 2 while you're trying to install it with Python 3. Either use Python 2.7 or get the new code for the framework from GitHub.
I review the github Seleniumlibrary, and you can use:
pip install --pre --upgrade robotframework-seleniumlibrary

pip install web.py but errors modulenotfounderror

use pip to install web.py,but it errors:
C:\Users\apple>pip install web.py
Collecting web.py
Downloading web.py-0.38.tar.gz (91kB)
100% |████████████████████████████████| 92kB 537kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\apple\AppData\Local\Temp\pip-build- drp6zgow\web.py\setup.py", line 6, in <module>
from web import __version__
File "C:\Users\apple\AppData\Local\Temp\pip-build-drp6zgow\web.py\web\__init__.py", line 14, in <module>
import utils, db, net, wsgi, http, webapi, httpserver, debugerror
ModuleNotFoundError: No module named 'utils'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\apple\AppData\Local\Temp\pip-build-drp6zgow\web.py\
Could you give me the reason and the steps, on how to solve it?
Have a try with the following
pip2 install web.py

pip install MySQL-python failed in linux

I've created a Django project and its works as well now I'm trying to config it with MySql so searched in Google and did some ways but when I pip install MySQL-python the below problem occurs:
Collecting MySQL-python
Using cached MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-lwubgejh/MySQL-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/tmp/pip-build-lwubgejh/MySQL-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lwubgejh/MySQL-python/
couldn't find any solution for this error:
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lwubgejh/MySQL-python/
thank you for help.
This library is not compatible with Python 3. Follow the advice in the Django docs and install mysqlclient instead.

Categories