- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix.bat
More file actions
Latest commit
52 lines (43 loc) · 1.29 KB
/
Copy pathfix.bat
File metadata and controls
52 lines (43 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@echooff
REM Fix installation with minimal dependencies (Windows)
echo 🔧 OpenCode Python - Installation Fix
echo ====================================
echo.
REM Check if pyproject.toml exists
ifnotexist"pyproject.toml" (
echo ❌ Error: pyproject.toml not found!
echo Please run this script from the python/ directory
pause
exit /b 1
)
echo 📦 Creating fresh virtual environment...
ifexist"venv" (
echo Removing old environment...
rmdir /s /q venv
)
python -m venv venv
echo 🔌 Activating virtual environment...
call venv\Scripts\activate
echo ⬆️ Upgrading pip...
python -m pip install --upgrade pip
echo 📥 Installing minimal dependencies first...
pip install -r requirements-minimal.txt
echo 📦 Installing OpenCode (without dependencies)...
pip install -e . --no-deps
echo.
echo ✅ Installation complete!
echo.
echo Testing...
python -c "import opencode; print('✓ Module imported successfully')"2>nul||echo ⚠️ Import test had warnings
echo.
echo 🎯 Next steps:
echo 1. Virtual environment is activated
echo.
echo 2. Try the CLI:
echo opencode --help
echo.
echo 3. Install additional features as needed:
echo pip install openai anthropic [For AI providers]
echo pip install pytest black ruff [For development]
echo.
pause