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

200
Views
Python/Django "Error de importación" en el directorio del proyecto

He tenido problemas con esto y no puedo encontrar la solución... He examinado todas las SO preguntas sobre esto, pero nada funcionó en mi caso... Así que aquí está el problema:

  1. Clono un proyecto del repositorio git
  2. Configure un virtualenv llamado env en el directorio base del proyecto con la versión adecuada de Python (2.7) e instale todos los requisitos correctamente
  3. Aquí es donde se pone divertido... Navego a la carpeta que tiene mi manage.py y hago un python manage.py makemigrations que da como resultado

from foo.bar.data import CoolioClass

ImportError: No module named foo.bar.data

Mis directorios se ven así (solo como ilustración):

 project_root/ ├──env/ ├──django/ │ ├── app │ │ └── models.py (from foo.bar.data import CoolioClass) │ ├── django │ │ └── settings.py │ └── manage.py └──foo/ ├── bar │ ├── __init__.py │ ├── data.py │ └── test.py ├── baz │ ├── __init__.py │ ├── data.py │ └── test.py └── __init__.py

Cuando sys.path en Python Shell, da como resultado:

 /home/johnny/project_root/env/lib/python2.7 /home/johnny/project_root/env/lib/python2.7/plat-x86_64-linux-gnu /home/johnny/project_root/env/lib/python2.7/lib-tk /home/johnny/project_root/env/lib/python2.7/lib-old /home/johnny/project_root/env/lib/python2.7/lib-dynload /usr/lib/python2.7 /usr/lib/python2.7/plat-x86_64-linux-gnu /usr/lib/python2.7/lib-tk /home/johnny/project_root/env/local/lib/python2.7/site-packages /home/johnny/project_root/env/lib/python2.7/site-packages
over 4 years ago · Santiago Trujillo
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!