[Django]-Installing MySQLDb python module *without* Internet Connection

1👍

  1. git clone https://github.com/PyMySQL/PyMySQL or download tarball. for mysqldb: https://github.com/farcepest/MySQLdb1
  2. untar it
  3. run sudo python setup.py install

That’s all.

1👍

Guess it’s too late, but for the sake of the future googlers…

I had the same problem. To solve it I had to comment these lines:

if not hasattr(pkg_resources, '_distribute'):
            if not no_fake:
                _fake_setuptools()
            raise ImportError

After this I was able to install MySQL-python via python setup.py install.

1👍

The answer to this question appears to be version dependent. MySQLDb version 1.2.5 (newest version as of this writing) and later do not require distribute so python setup.py install will work. Version 1.2.5 was released 01/2014 so this question is just that old.

Leave a comment