0

I am trying to make use of MySQLdb in Pycharm/Python 2.7, however I am unable to import the MySQLdb module at all. I get the following error:

(calendar_cron) Macbook-Pro:calendar_cron user$ pip install MySQLdb
Collecting MySQLdb
  Could not find a version that satisfies the requirement MySQLdb (from versions: )
No matching distribution found for MySQLdb

I have tried the following:

  • Updating pip using Homebrew brew install python@2
  • Updating pip (now running v10.0.1)

I have to be honest, am somewhat perplexed by the nature of the problem. Cannot establish whether it is due to OpenSSL being an old version or something else. Some guidance would be very welcome.

EDIT: I have also tried installing MySQLdb-python, same error

btongeorge
  • 421
  • 2
  • 12
  • 23
  • you might try installing Mysqldb1 manually. Otherwise follow the details regarding legacy driver support in this question [https://stackoverflow.com/questions/43102442/whats-the-difference-between-mysqldb-mysqlclient-and-mysql-connector-python] – webmite May 29 '18 at 19:40
  • Possible duplicate of [How to install Python MySQLdb module using pip?](https://stackoverflow.com/questions/25865270/how-to-install-python-mysqldb-module-using-pip) – ivan_pozdeev May 29 '18 at 19:40
  • Try `pip install MySQL-python` from the [pip site of MySQLdb](https://pypi.org/project/MySQL-python/) – MegaIng May 29 '18 at 20:39

0 Answers0