# pip3.4 install mysql-python
Downloading/unpacking mysql-python
Downloading MySQL-python-1.2.5.zip (108kB): 108kB downloaded
Running setup.py (path:/tmp/pip_build_root/mysql-python/setup.py) egg_info for package mysql-python
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/mysql-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/tmp/pip_build_root/mysql-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
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/mysql-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/tmp/pip_build_root/mysql-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/mysql-python
Storing debug log for failure in /root/.pip/pip.log
MySQL-python 1.2.5 does not support Python 3. The Django 1.7 docs recommend the fork mysqlclient.
Resolved:
pip3.4 install --allow-external mysql-connector-python
Edit settings.py
'ENGINE': 'mysql.connector.django',
Under Centos: yum install mysql-devel
pip3 install mysqlclient
On Ubuntu or Debian, just sudo apt-get install python-mysqldb. It worked for me
Related
I've been trying to install Poppler using the pip command pip install python-poppler-qt4==0.18.1 but it shows a message like this
Downloading/unpacking python-poppler-qt4==0.18.1
Downloading python-poppler-qt4-0.18.1.tar.gz
Running setup.py (path:C:\Users\BOOMER~1\AppData\Local\Temp\pip_build_Boomerang RMS\python-poppler-qt4\setup.py) egg_info for package python-poppler-qt4
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "C:\Users\BOOMER~1\AppData\Local\Temp\pip_build_Boomerang RMS\python-poppler-qt4\setup.py", line 42, in <module>
import sipdistutils
ImportError: No module named 'sipdistutils'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "C:\Users\BOOMER~1\AppData\Local\Temp\pip_build_Boomerang RMS\python-poppler-qt4\setup.py", line 42, in <module>
import sipdistutils
ImportError: No module named 'sipdistutils'
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in C:\Users\BOOMER~1\AppData\Local\Temp\pip_build_Boomerang RMS\python-poppler-qt4
Storing debug log for failure in C:\Users\Boomerang\pip\pip.log
How can I do this correctly?
i want to install mysqlclient but it returns me
(venv)amir#amg76:~/Documents/Computer/Python/Django/vira/virasciencecom$ pip3 install mysqlclient==1.3.7
Collecting mysqlclient==1.3.7
Using cached mysqlclient-1.3.7.tar.gz
Complete output from command python setup.py egg_info:
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-c5i8m5ok/mysqlclient/setup.py", line 17, in <module>
metadata, options = get_config()
File "/tmp/pip-build-c5i8m5ok/mysqlclient/setup_posix.py", line 44, in get_config
libs = mysql_config("libs_r")
File "/tmp/pip-build-c5i8m5ok/mysqlclient/setup_posix.py", line 26, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
OSError: mysql_config not found
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-c5i8m5ok/mysqlclient/
the same thing happen when i try to install pillow and i use python 3.6 and ubuntu 17.10
can any body help me?
You need to install libmysqlclient-dev or libmariaclient-dev from your distro package repository, depending whether you're using mysql or mariadb respectively.
I try to install library into my project using next way:
pip3 install -r requirements.txt
My requirements.txt contains:
six
Cython
git+https://github.com/ajelenak/pysaxon.git
But installations fails:
Collecting git+https://github.com/ajelenak/pysaxon.git (from -r /var/www/gost/gost/requirements.txt (line 20))
Cloning https://github.com/ajelenak/pysaxon.git to /tmp/pip-zkz6pq1u-build
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-zkz6pq1u-build/setup.py", line 8, in <module>
from Cython.Build import cythonize
ImportError: No module named 'Cython'
What is wrong?
This question already has answers here:
Python3.4 can't install mysql-python
(4 answers)
Closed 5 years ago.
]mitwas-MacBook-Air:mytestsite Mitwa$ pip3 install MYSQL-python
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 "/private/var/folders/9l/9zjr811503367lfnybnyqlqc0000gn/T/pip-build-fk08ytxi/MYSQL-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/private/var/folders/9l/9zjr811503367lfnybnyqlqc0000gn/T/pip-build-fk08ytxi/MYSQL-python/setup_posix.py", line 2, in
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/9l/9zjr811503367lfnybnyqlqc0000gn/T/pip-build-fk08ytxi/MYSQL-python/
I am getting this error while setting up Django MYSQL for python. Anyone have idea how to solve it?
MYSQL-python is not compatible with Python 3. Install mysqlclient instead.
pip3 install mysqlclient
Hello Stackoverflow users,
For my student project i need to use python and mysql, but when i try to use i've this kind of error
Traceback (most recent call last):
File "myRFIDserv.py", line 2, in
import MySQLdb
ImportError: No module named MySQLdb
I 've try to fix this with the installation of python-mysqldb but they have also a error ...
Package python-mysqldb is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python-mysqldb' has no installation candidate
MySQL-server are already install !
I've try sudo pip install MySQL-python but i have this kind of error
Collecting MySQL-python
Using cached MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-lbb0Fd/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
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lbb0Fd/MySQL-python
I don't understand, someone can help me ? ;)
maybe you can try
pip install MySQL-python