How can I install the MySQLdb module for Python using pip?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
If pip3 isn't working, you can try:
If you are use Raspberry Pi [Raspbian OS]
There are need to be install pip command at first
So that just install Sequently
well this worked for me:
this is for python 3.x
pip install mysql-connector-python
as noted in the documentation:https://dev.mysql.com/doc/connector-python/en/connector-python-installation-binary.html
on RHEL 7:
sudo yum install yum-utils mariadb-devel python-pip python-devel gcc
sudo /bin/pip2 install MySQL-python
I tried all the option but was not able to get it working on Redhat platform. I did the following to make it work:-
Once the package was installed was able to import module as follows in the interpreter:-