109 lines
2.8 KiB
Markdown
109 lines
2.8 KiB
Markdown
The main issues are with system-level dependencies like `libreoffice` and `gcc` which aren't typically managed through conda on macOS.
|
|
|
|
```yaml:backend/requirements.conda.yml
|
|
name: classroomcopilot-backend
|
|
channels:
|
|
- conda-forge
|
|
- nodefaults
|
|
dependencies:
|
|
- python=3.11
|
|
# Core dependencies
|
|
- pip
|
|
- setuptools
|
|
- wheel
|
|
# Server dependencies
|
|
- fastapi
|
|
- uvicorn
|
|
- python-dotenv
|
|
- python-multipart
|
|
- python-jose
|
|
- pyjwt
|
|
- jinja2
|
|
# Database and Auth
|
|
- sqlalchemy
|
|
- sqlalchemy-utils
|
|
- asyncpg
|
|
- redis-py
|
|
# Neo4j
|
|
- neo4j-python-driver
|
|
# Data Processing
|
|
- pandas
|
|
- scipy
|
|
- requests
|
|
- openpyxl
|
|
- scikit-learn
|
|
# Testing
|
|
- pytest
|
|
- pytest-html
|
|
# Database clients
|
|
- postgresql
|
|
- libpq
|
|
# Additional dependencies via pip
|
|
- pip:
|
|
# Supabase
|
|
- supabase
|
|
# Neo4j specific
|
|
- neontology
|
|
# Document Processing
|
|
- python-pptx
|
|
- python-docx
|
|
- pdfminer.six
|
|
- Pillow
|
|
- psutil
|
|
# Web Scraping and Processing
|
|
- emoji
|
|
- extruct
|
|
- w3lib
|
|
# Google APIs
|
|
- youtube-transcript-api
|
|
- google-api-python-client
|
|
- google-auth-oauthlib
|
|
# LangChain Ecosystem
|
|
- "langchain[llms]"
|
|
- langchain-community
|
|
- langchain-openai
|
|
- langgraph
|
|
# OpenAI
|
|
- openai
|
|
- ollama
|
|
# Microsoft Authentication
|
|
- msal
|
|
```
|
|
I've made several important changes to make the conda environment more compatible:
|
|
|
|
1. Removed system-level dependencies that should be installed via the system package manager:
|
|
- `libreoffice` - Install via Homebrew on macOS (`brew install libreoffice`)
|
|
- `gcc` - Install via Xcode Command Line Tools on macOS
|
|
- `poppler` - Install via Homebrew on macOS (`brew install poppler`)
|
|
|
|
2. Changed channel configuration:
|
|
- Using only `conda-forge` with `nodefaults` to avoid package conflicts
|
|
- This provides better consistency across platforms
|
|
|
|
3. Fixed the `langchain[llms]` specification by adding quotes to handle the square brackets properly
|
|
|
|
For macOS users, here are the steps to set up the environment:
|
|
|
|
1. First, install system dependencies:
|
|
```bash
|
|
# Install Xcode Command Line Tools (if not already installed)
|
|
xcode-select --install
|
|
|
|
# Install other system dependencies via Homebrew
|
|
brew install libreoffice poppler postgresql
|
|
```
|
|
|
|
2. Then create the conda environment:
|
|
```bash
|
|
conda env create -f backend/requirements.conda.yml
|
|
```
|
|
|
|
3. Activate the environment:
|
|
```bash
|
|
conda activate classroomcopilot-backend
|
|
```
|
|
|
|
This setup should now work properly on macOS while still maintaining compatibility with the Docker environment for production. The system-level dependencies are handled by the appropriate system package manager (Homebrew for macOS) rather than conda, which is the recommended approach for these types of dependencies.
|
|
|
|
Would you like me to make any additional adjustments to the environment configuration?
|