Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

378
Views
cómo configurar django con mysql usando pymysql (python 3.5)

teniendo muchos problemas para que mysql (5.6) se conecte con django (1.11) usando python 3.5.2 en ubuntu (16.04) venv. Estoy tratando de usar pymysql porque funciona muy bien con las aplicaciones de matraz, pero todavía no con django. mysqlclient falló en la instalación y tiene otras dependencias (he leído los documentos de django, sí), por lo que preferiría evitar ese módulo. esto realmente debería funcionar ya que funciona perfectamente en el matraz y otros parecen tenerlo funcionando. esto es lo que he probado y encontrado:

 # first steps pip install pymysql mysql -u root -p CREATE DATABASE djang0 CHARACTER SET utf8 COLLATE utf8_bin; # manage.py try: import pymysql pymysql.install_as_MySQLdb() except ImportError: pass # settings.py DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'djang0', 'USER': 'root', 'PASSWORD': 'mypasswd', 'HOST': '', 'PORT': '3306', } } # current models.py Post class for blog class Post(models.Model): title = models.CharField(max_length=140) body = models.TextField() date = models.DateTimeField() image = models.ImageField(upload_to='uploads', blank=True) # error - full here https://dpaste.de/vtEH [Thu Apr 27 18:58:00.010964 2017] [wsgi:error] [pid 22811:tid 3049028416] [remote 192.168.0.3:52267] django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named 'MySQLdb'. [Thu Apr 27 18:58:00.010967 2017] [wsgi:error] [pid 22811:tid 3049028416] [remote 192.168.0.3:52267] Did you install mysqlclient or MySQL-python?
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

tuvo que usar la dependencia, pip install mysqlclient. abucheo

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!