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.
Related
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.
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
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
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
I am trying to install python module Flask-Spyne on Windows and when I type pip install Flask-Spyne, on Sec-Wall collecting TypeError appear.
I am using Python 3.5.1 on Windows 10
This is it:
C:\Windows\system32>pip install flask-spyne
Collecting flask-spyne
Using cached Flask-Spyne-0.2.tar.gz
Collecting flask (from flask-spyne)
Using cached Flask-0.11.1-py2.py3-none-any.whl
Collecting spyne (from flask-spyne)
Using cached spyne-2.12.11.tar.gz
Collecting sec-wall (from flask-spyne)
Using cached sec-wall-1.2.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\SIVK~1\AppData\Local\Temp\pip-build-mydzld6p\sec-wall\setup.py", line 30, in <module>
packages = find_packages(b"src"),
File "c:\program files (x86)\python35-32\lib\site-packages\setuptools\__init__.py", line 51, in find
out = cls._find_packages_iter(convert_path(where))
File "c:\program files (x86)\python35-32\lib\distutils\util.py", line 129, in convert_path
paths = pathname.split('/')
TypeError: a bytes-like object is required, not 'str'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\SIVK~1\AppData\Local\Temp\pip-build-mydzld6p\sec-wall\
I tried solve python setup.py egg_info error, nothing.
I tried to look at that TypeError, nothing.
Does someone know how to solve it? For any advice I am happy :)
PS: If it help, that when I type pip install suds, this appear:
C:\Windows\system32>pip install suds
Collecting suds
Using cached suds-0.4.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\SIVK~1\AppData\Local\Temp\pip-build-l7jpgeg4\suds\setup.py", line 20, in <module>
import suds
File "C:\Users\SIVK~1\AppData\Local\Temp\pip-build-l7jpgeg4\suds\suds\__init__.py", line 154, in <module>
import client
ImportError: No module named 'client'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\SIVK~1\AppData\Local\Temp\pip-build-l7jpgeg4\suds\
According to Spyne's documentation, it's known to work with Python versions 2.6. and 2.7, but Python 3 support is not tested.
Also, the error you've got TypeError: a bytes-like object is required, not 'str' is what people often experience when migrating their code from python 2.7 to python 3.
I can reproduce your error when installing the package for python 3.5. And I got no errors when installing it for Python 2.7.
So, maybe you have to switch to Python 2.7, and/or report the problem to the package's developer.