0

I am doing some pylons work in a virtual python enviorment, I want to use MySQL with SQLalchemy but I can't install the MySQLdb module on my virtual enviorment, I can't use easyinstall because I am using a version that was compiled for python 2.6 in a .exe format, I tried running the install from inside the virtual enviorment but that did not work, any sugestions?

Joshkunz
  • 5,575
  • 6
  • 28
  • 24
  • "It doesn't work" is not an error message. :-) Try explain what doesn't work. It should be perfectly possible to install any python module inside a virtualenv, if you can install it globally. – Lennart Regebro Oct 13 '09 at 04:42
  • There was no error message that's why I was stumped but I got it all figured out now :) – Joshkunz Oct 13 '09 at 06:39
  • 1
    @Joshkunz: Please add the solution (as an answer) so people searching the question can also solve their problems. – nosklo Oct 13 '09 at 12:07

1 Answers1

0

Ok Got it all figured out, After I installed the module on my normal python 2.6 install I went into my Python26 folder and low and behold I happened to find a file called MySQL-python-wininst which happened to be a list of all of the installed module files. Basicly it was two folders called MySQLdb and another called MySQL_python-1.2.2-py2.6.egg-info as well as three other files: _mysql.pyd, _mysql_exceptions.py, _mysql_exceptions.pyc. So I went into the folder where they were located (Python26/Lib/site-packages) and copied them to virtualenv's site-packages folder (env/Lib/site-packages) and the module was fully functional!

Note: All paths are the defaults

Joshkunz
  • 5,575
  • 6
  • 28
  • 24