Ajout documentation dépendances + script de vérification
- DEPENDENCIES.md: Documentation complète de toutes les dépendances * Backend Python (requirements.txt) * Dépendances système (apt packages) * Frontend Node.js (package.json) * Modèles Essentia (28 MB) * Variables d'environnement requises - check_dependencies.py: Script pour vérifier l'installation * Teste tous les imports Python * Affiche statut ✅/❌ pour chaque package * Utile pour debug d'installation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
76
backend/check_dependencies.py
Normal file
76
backend/check_dependencies.py
Normal file
@@ -0,0 +1,76 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Check all required dependencies are installed."""
|
||||
import sys
|
||||
|
||||
def check_import(module_name, package_name=None):
|
||||
"""Try to import a module and report status."""
|
||||
package = package_name or module_name
|
||||
try:
|
||||
__import__(module_name)
|
||||
print(f"✅ {package}")
|
||||
return True
|
||||
except ImportError as e:
|
||||
print(f"❌ {package}: {e}")
|
||||
return False
|
||||
|
||||
def main():
|
||||
"""Check all dependencies."""
|
||||
print("🔍 Checking Python dependencies...\n")
|
||||
|
||||
dependencies = [
|
||||
# Web Framework
|
||||
("fastapi", "fastapi"),
|
||||
("uvicorn", "uvicorn"),
|
||||
("multipart", "python-multipart"),
|
||||
|
||||
# Database
|
||||
("sqlalchemy", "sqlalchemy"),
|
||||
("psycopg2", "psycopg2-binary"),
|
||||
("pgvector.sqlalchemy", "pgvector"),
|
||||
("alembic", "alembic"),
|
||||
|
||||
# Audio Processing
|
||||
("librosa", "librosa"),
|
||||
("soundfile", "soundfile"),
|
||||
("audioread", "audioread"),
|
||||
("mutagen", "mutagen"),
|
||||
|
||||
# Scientific
|
||||
("numpy", "numpy"),
|
||||
("scipy", "scipy"),
|
||||
|
||||
# Configuration
|
||||
("pydantic", "pydantic"),
|
||||
("pydantic_settings", "pydantic-settings"),
|
||||
("dotenv", "python-dotenv"),
|
||||
("email_validator", "email-validator"),
|
||||
|
||||
# Authentication
|
||||
("jose", "python-jose"),
|
||||
("passlib", "passlib"),
|
||||
|
||||
# Utilities
|
||||
("aiofiles", "aiofiles"),
|
||||
("httpx", "httpx"),
|
||||
|
||||
# Essentia (optional)
|
||||
("essentia.standard", "essentia-tensorflow"),
|
||||
]
|
||||
|
||||
all_ok = True
|
||||
for module, package in dependencies:
|
||||
if not check_import(module, package):
|
||||
all_ok = False
|
||||
|
||||
print("\n" + "="*50)
|
||||
if all_ok:
|
||||
print("✅ All dependencies installed!")
|
||||
return 0
|
||||
else:
|
||||
print("❌ Some dependencies are missing")
|
||||
print("\nInstall missing dependencies with:")
|
||||
print(" pip install -r requirements.txt")
|
||||
return 1
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
Reference in New Issue
Block a user