diff --git a/requirements.txt b/requirements.txt index 3e77fe9..9096ec7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ Flask==3.0.0 Flask-Session==0.6.0 -PyMuPDF==1.23.7 Werkzeug==3.0.1 waitress==3.0.0 requests-oauthlib==2.0.0 -python-dotenv==1.2.1 \ No newline at end of file +python-dotenv==1.2.1 +# PyMuPDF==1.23.7 # Optional - will be installed separately if possible \ No newline at end of file diff --git a/ubuntu-install.sh b/ubuntu-install.sh index 6707952..e78d1cd 100644 --- a/ubuntu-install.sh +++ b/ubuntu-install.sh @@ -96,6 +96,15 @@ log_info "Installing Python dependencies..." pip install --upgrade pip pip install -r requirements.txt +# Try to install PyMuPDF (optional for PDF processing) +log_info "Attempting to install PyMuPDF for PDF processing..." +if pip install PyMuPDF==1.23.7; then + log_success "PyMuPDF installed successfully" +else + log_warning "PyMuPDF installation failed - PDF processing will not be available" + log_warning "You can try installing it manually later with: pip install PyMuPDF" +fi + # Create .env file with Azure AD configuration log_info "Configuring Azure AD authentication..." echo "" @@ -321,6 +330,7 @@ Type=simple User=$USER WorkingDirectory=$APP_DIR Environment=PATH=$APP_DIR/venv/bin +Environment=PYTHONPATH=$APP_DIR ExecStart=$APP_DIR/venv/bin/python $APP_DIR/app.py Restart=always RestartSec=5 @@ -446,6 +456,6 @@ echo " Update app: ./manage.sh update" echo "==================================================================" # Check if .env needs configuration -if grep -q "your-tenant-id-here" .env; then - log_warning "IMPORTANT: Configure your .env file before using the application!" +if [[ -z "$AZURE_TENANT_ID" || -z "$AZURE_CLIENT_ID" || -z "$AZURE_CLIENT_SECRET" ]]; then + log_warning "IMPORTANT: Azure AD configuration is incomplete. Please check your .env file!" fi \ No newline at end of file