Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/01/2014, 02:45
Avatar de razpeitia
razpeitia
Moderador
 
Fecha de Ingreso: marzo-2005
Ubicación: Monterrey, México
Mensajes: 7.321
Antigüedad: 19 años, 1 mes
Puntos: 1360
Respuesta: MySQL en VirtualEnv con Python 3.3 y Windows.

Tienes que ajustar y correr este script para registrar tu virtualenv como default. Y ahora si poder instalar esos binarios en tu virtualenv.

Código Python:
Ver original
  1. import sys
  2.  
  3. from _winreg import *
  4.  
  5. # tweak as necessary
  6. version = sys.version[:3]
  7. installpath = sys.prefix
  8.  
  9. regpath = "SOFTWARE\\Python\\Pythoncore\\%s\\" % (version)
  10. installkey = "InstallPath"
  11. pythonkey = "PythonPath"
  12. pythonpath = "%s;%s\\Lib\\;%s\\DLLs\\" % (
  13.     installpath, installpath, installpath
  14. )
  15.  
  16. def RegisterPy():
  17.     try:
  18.         reg = OpenKey(HKEY_LOCAL_MACHINE, regpath)
  19.     except EnvironmentError:
  20.         try:
  21.             reg = CreateKey(HKEY_LOCAL_MACHINE, regpath)
  22.         except Exception, e:
  23.             print "*** Unable to register: %s" % e
  24.             return
  25.  
  26.     SetValue(reg, installkey, REG_SZ, installpath)
  27.     SetValue(reg, pythonkey, REG_SZ, pythonpath)
  28.     CloseKey(reg)
  29.     print "--- Python %s at %s is now registered!" % (version, installpath)
  30.  
  31. if __name__ == "__main__":
  32.     RegisterPy()