-1

I'm about to lose my mind over this one, so any help is much appreciated.

I'm working with win8.1, and Enthought Canopy Python 2.7.6 that I'm running from the command line. I initally had difficulties installing MySQLdb, but eventually the MySQL‑python‑1.2.5.win‑amd64‑py2.7.exe installer from http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python worked.

Stupidly a few weeks later there was something that wouldn't work in MySQLdb 1.2.4 so I used pip to roll it back to 1.2.4 and now it's gone - anytime I run programs I get 'import error: No module named MySQLdb'

I've tried pip, easy_install, installing from sources, that installer from above again, with no avail. It's saying that it's installed, it's in CP add/remove programs. When I run pip install MySQL-python:

Requirement already satisfied (use --upgrade to upgrade): MySQL-python in c:\use rs\laura\appdata\local\enthought\canopy\user\lib\site-packages Cleaning up...

When I navigate to that directory there are two mysqldb folders named - mysqldb - contains - constants, init, connections, converters, cursors, release, times

and mysql_python-1.2.5-py2.7.egg-info - contains - dependency_links, PKG-INFO, SOURCES, top_level

Thanks in advance for any help, Laura

EDIT: I ended up working around the problem by using pymysql instead.

Laura
  • 1
  • 1

1 Answers1

0

I have MySQLdb module locally installed and can run scripts with it in the command line just fine, but when I run scripts with the MySQLdb module in the Canopy IDE then it does not work. I would check to see if MySQLdb module is an installed package on Canopy because im pretty sure (could be wrong) that you have to subscribe to canopy to get that module. Hope that helps

Rick James
  • 237
  • 1
  • 2
  • 8