# django.core.exceptions.ImproperlyConfigured: Error importing migration module django.contrib.admin.migrations: No module named 'django.contrib.admin.migrations'

- **ID:** `python/django-missing-migrations-dir`
- **Domain:** python
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The migrations package directory is missing or corrupted, often due to incomplete installation or manual deletion.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (70% success)
   ```
   Reinstall Django: pip install --force-reinstall Django==3.2.0
   ```
2. **** (90% success)
   ```
   Create empty __init__.py in each app's migrations directory, then run makemigrations --empty appname
   ```

## Dead Ends

- **** — Running migrate again won't recreate missing migration files; it only applies existing migrations. (80% fail)
- **** — Deleting and recreating the migrations folder manually can cause inconsistency with the database migration history. (60% fail)
