-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix.bat
More file actions
52 lines (43 loc) Β· 1.29 KB
/
fix.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
@echo off
REM Fix installation with minimal dependencies (Windows)
echo π§ OpenCode Python - Installation Fix
echo ====================================
echo.
REM Check if pyproject.toml exists
if not exist "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...
if exist "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