2

The pip and easy install commands (install MySQL-python) provide the massive error listed below.

I've been looking around for an answer a while now on this site and through google. The recurring answer is to install python dev (pip install python-dev) however the response I receive is "no distributions at all found"

Does anyone know the correct syntax in order to do this? or could someone be kind enough to point out where I'm going wrong.

All help is greatly appreciated. Thanks

 C:\virtualenvs\myvirtualenv2\Scripts\pip-script.py run on 04/13/11 16:28:18
Downloading/unpacking mySQL-python
 Running setup.py egg_info for package mySQL-python
 Traceback (most recent call last):
 File "<string>", line 14, in <module>
 File "C:\virtualenvs\myvirtualenv2\build\mySQL-python\setup.py", line 15, in <module>
 metadata, options = get_config()
 File "setup_windows.py", line 7, in get_config
 serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key'])
 WindowsError: [Error 2] The system cannot find the file specified
 Complete output from command python setup.py egg_info:
 Traceback (most recent call last):
 File "<string>", line 14, in <module>
 File "C:\virtualenvs\myvirtualenv2\build\mySQL-python\setup.py", line 15, in <module>
 metadata, options = get_config()
 File "setup_windows.py", line 7, in get_config
 serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key'])
WindowsError: [Error 2] The system cannot find the file specified
----------------------------------------
Command python setup.py egg_info failed with error code 1
Exception information:
Traceback (most recent call last):
 File "C:\virtualenvs\myvirtualenv2\lib\site-packages\pip-1.0-py2.6.egg\pip\basecommand.py", line 126, in main
 self.run(options, args)
 File "C:\virtualenvs\myvirtualenv2\lib\site-packages\pip-1.0-py2.6.egg\pip\commands\install.py", line 223, in run
 requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
 File "C:\virtualenvs\myvirtualenv2\lib\site-packages\pip-1.0-py2.6.egg\pip\req.py", line 980, in prepare_files
 req_to_install.run_egg_info()
 File "C:\virtualenvs\myvirtualenv2\lib\site-packages\pip-1.0-py2.6.egg\pip\req.py", line 216, in run_egg_info
 command_desc='python setup.py egg_info')
 File "C:\virtualenvs\myvirtualenv2\lib\site-packages\pip-1.0-py2.6.egg\pip\__init__.py", line 255, in call_subprocess
 % (command_desc, proc.returncode))
InstallationError: Command python setup.py egg_info failed with error code 1
Sridhar Ratnakumar
86.5k66 gold badges151 silver badges196 bronze badges
asked Apr 13, 2011 at 15:49

2 Answers 2

5

Try ActivePython:

pypm -E C:\virtualenvs\myvirtualenv2 install mysql-python

no compile orgy. no strange errors. no terror.

answered Apr 14, 2011 at 16:45
Sign up to request clarification or add additional context in comments.

Comments

3

Installing mysqldb on windows is tricky. I can install it manually, after downloading and unpacking mySQL-python:

  1. Go to MySQL-python-1.2.3 folder
  2. Edit the file site.cfg
  3. Run regedit in Start> Run and verify the proper path for MySQL, mine looks like SOFTWARE\MySQL AB\MySQL Server 5.1
  4. Uncomment the line registry_key
  5. Set it:

    registry_key = SOFTWARE\MySQL AB\MySQL Server 5.1

  6. Run python setup.py install under your virtualenv
answered Apr 13, 2011 at 16:00

2 Comments

Cheers, Im running into "Unable to find vcvarsall.bat" any ideas? there's a compiler but this installs into the main Directory and not the virtual one?
Ive also tried the following however i receive error command 'gcc' failed: No such file or directory 1. Download minGW32 installer from sourceforge 2. When you install the tool and get the screen asking what components to install, select "MinGW base tools", "g++ compiler" and "MingW make". 3. After MinGW is installed, add C:\MinGW\bin to your Path environment variable 4. Create a file in C:\Python26\Lib\distutils and call it distutils.cfg 5. In this file, put the following:

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.