0

I am using python 3.6 and install django 1.11.7. Its working fine with Oracle and Sqlite3. But not working with mysql.

To connect with mysql tried to install package Mysql-python but it showing error:

***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 "", line 1, in File "/tmp/pycharm-packaging168/MySQL-python/setup.py", line 13, in from setup_posix import get_config File "/tmp/pycharm-packaging168/MySQL-python/setup_posix.py", line 2, in from ConfigParser import SafeConfigParser ModuleNotFoundError: No module named 'ConfigParser'

----------------------------------------***
  • I guessed that i should download ConfigParser. But configparser itself showing error:

Collecting configparse No matching distribution found for configparse equirement configparse (from versions: )

Now i am stuck. Please Help

3 Answers 3

3

try to install MySQL properly with the following script.

sudo apt install mysql-server
sudo mysql_secure_installation
sudo apt install php libapache2-mod-php php-mysql
sudo apt-get install libmysqlclient-dev

follow the instruction for complete the installation.

then install the following script.

pip install mysqlclient
Sign up to request clarification or add additional context in comments.

Comments

0

Try this

sudo apt-get install python-dev python3-dev
sudo apt-get install libmysqlclient-dev

Then do this

pip install mysqlclient

Comments

0

mysql-python is not supported for python 3.x, Install mysqlclient using the following command:

pip install mysqlclient

If you are connecting to a proxy in a corporate environment, then use the following command:

pip install mysqlclient --proxy=proxy:8080

Comment If you need help on using pip.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.