Foros del Web » Programando para Internet » Python »

MySQL en VirtualEnv con Python 3.3 y Windows.

Estas en el tema de MySQL en VirtualEnv con Python 3.3 y Windows. en el foro de Python en Foros del Web. Buenas, acabo de instalar python y demás después de un gran tiempo y estoy terminando de setear todo para trabajar cómodamente. Estoy usando WINDOWS, lo ...
  #1 (permalink)  
Antiguo 08/01/2014, 02:07
 
Fecha de Ingreso: marzo-2007
Mensajes: 340
Antigüedad: 17 años, 1 mes
Puntos: 4
MySQL en VirtualEnv con Python 3.3 y Windows.

Buenas, acabo de instalar python y demás después de un gran tiempo y estoy terminando de setear todo para trabajar cómodamente.

Estoy usando WINDOWS, lo que instale:

1) Instale python 3.3

2) Instale setuptools 2.0.1 (ez_setup.py)

3) Instale PIP (get-pip.py)

4) Instale virtualenvwrapper-win (me instalo automáticamente virtualenv 1.9.1)
https://github.com/davidmarble/virtualenvwrapper-win

6) Cree una variable de entorno en windows WORKON_HOME = D:\Django\envs

7) Cree un entorno virtual llamado "algo"

Y ahora mi duda es como hacer para instalar mysql en los entornos fácilmente.

Las librerías compiladas que encontré son:

Aspell_python bindings for GNU Aspell (using LyX fork). :

http://www.lfd.uci.edu/~gohlke/pythonlibs/

y Windows (Architecture Independent), MSI Installer
Python 3.3 en http://dev.mysql.com/downloads/connector/python/

Como hago ??? si las instalo los files van ir derecho al folder de python, copio y pego, que onda ??? que librería recomiendan ? Muchas gracias !
  #2 (permalink)  
Antiguo 08/01/2014, 02:45
Avatar de 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()

Etiquetas: ip, librerías, mysql
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 20:46.