File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -399,6 +399,27 @@ public void Pip(string[] args)
399399 }
400400 }
401401
402+ public void PipLocal ( string [ ] args )
403+ {
404+ ProcessStartInfo run0 = new ProcessStartInfo ( ) ;
405+ run0 . FileName = "python3_12\\ Scripts\\ pip.exe" ;
406+ run0 . Arguments = "install " + string . Join ( " " , args ) + " --no-index --find-links /" ;
407+ run0 . UseShellExecute = false ;
408+ run0 . RedirectStandardOutput = true ;
409+ run0 . CreateNoWindow = true ;
410+ using ( Process process = Process . Start ( run0 ) )
411+ {
412+ using ( StreamReader reader = process . StandardOutput )
413+ {
414+ string result = reader . ReadToEnd ( ) ;
415+ if ( console )
416+ {
417+ Console . WriteLine ( result ) ;
418+ }
419+ }
420+ }
421+ }
422+
402423 public void Run ( string script )
403424 {
404425 if ( RunDone )
You can’t perform that action at this time.
0 commit comments