@@ -27,7 +27,7 @@ pub fn ensure_uv(app_dir: &Path) -> Result<(), String> {
2727 download_file ( & url, & zip_path) ?;
2828 extract_zip ( & zip_path, & uv_dir) ?;
2929
30- let nested = uv_dir. join ( format ! ( "uv-x86_64-pc-windows-msvc" ) ) ;
30+ let nested = uv_dir. join ( "uv-x86_64-pc-windows-msvc" ) ;
3131 if nested. exists ( ) {
3232 for entry in std:: fs:: read_dir ( & nested) . map_err ( |e| e. to_string ( ) ) ? {
3333 let entry = entry. map_err ( |e| e. to_string ( ) ) ?;
@@ -57,13 +57,13 @@ pub fn ensure_dartlab(app_dir: &Path) -> Result<(), String> {
5757 ui:: print_step ( 2 , 4 , "Python 환경 생성 중..." ) ;
5858
5959 let status = Command :: new ( & uv)
60- . args ( [ "init " , "--no-workspace " ] )
60+ . args ( [ "venv " , venv . to_str ( ) . unwrap ( ) , "--python" , "3.12 "] )
6161 . current_dir ( app_dir)
6262 . status ( )
6363 . map_err ( |e| e. to_string ( ) ) ?;
6464
6565 if !status. success ( ) {
66- return Err ( "uv init failed" . into ( ) ) ;
66+ return Err ( "uv venv failed" . into ( ) ) ;
6767 }
6868
6969 ui:: print_ok ( "Python 환경 생성 완료" ) ;
@@ -72,13 +72,13 @@ pub fn ensure_dartlab(app_dir: &Path) -> Result<(), String> {
7272 ui:: print_step ( 3 , 4 , "DartLab 설치/업데이트 중..." ) ;
7373
7474 let status = Command :: new ( & uv)
75- . args ( [ "add " , "dartlab[ai]" ] )
75+ . args ( [ "pip " , "install" , " dartlab[ai]", "--python" , venv . join ( "Scripts" ) . join ( "python.exe" ) . to_str ( ) . unwrap ( ) ] )
7676 . current_dir ( app_dir)
7777 . status ( )
7878 . map_err ( |e| e. to_string ( ) ) ?;
7979
8080 if !status. success ( ) {
81- return Err ( "uv add dartlab[ai] failed" . into ( ) ) ;
81+ return Err ( "uv pip install dartlab[ai] failed" . into ( ) ) ;
8282 }
8383
8484 ui:: print_ok ( "DartLab 설치 완료" ) ;
0 commit comments