I am trying to pip install
the MySQL-python
package, but I get an ImportError
.
Jans-MacBook-Pro:~ jan$ /Library/Framew
pip install configparser
sudo cp /usr/lib/python3.6/configparser.py /usr/lib/python3.6/ConfigParser.py
Then try to install the MYSQL-python again. That Worked for me
how about checking the version of Python you are using first.
import six
if six.PY2:
import ConfigParser as configparser
else:
import configparser
I got further with Valeres answer:
pip install configparser sudo cp /usr/lib/python3.6/configparser.py /usr/lib/python3.6/ConfigParser.py Then try to install the MYSQL-python again. That Worked for me
I would suggest to link the file instead of copy it. It is save to update. I linked the file to /usr/lib/python3/
directory.
This worked for me
cp /usr/local/lib/python3.5/configparser.py /usr/local/lib/python3.5/ConfigParser.py
Do pip3 install PyMySQL
and then pip3 install mysqlclient
.
Worked for me
I still have this issue, so I go to /usr/lib/python3.8 and type as sudoer:
cp configparser.py ConfigParser.py
You may have another python version than 3.8.