File tree Expand file tree Collapse file tree 3 files changed +37
-10
lines changed
interpreter/terminal_interface/profiles/defaults Expand file tree Collapse file tree 3 files changed +37
-10
lines changed Original file line number Diff line number Diff line change @@ -215,8 +215,16 @@ def get_function_info(file_path):
215215 time .sleep (2 )
216216 print ("Attempting to start OS control anyway...\n \n " )
217217
218- for pip_name in ["pip" , "pip3" ]:
219- command = f"{ pip_name } install open-interpreter[os]"
218+ for pip_combo in [
219+ ["pip" , "quotes" ],
220+ ["pip" , "no-quotes" ],
221+ ["pip3" , "quotes" ],
222+ ["pip" , "no-quotes" ],
223+ ]:
224+ if pip_combo [1 ] == "quotes" :
225+ command = f'{ pip_combo [0 ]} install "open-interpreter[os]"'
226+ else :
227+ command = f"{ pip_combo [0 ]} install open-interpreter[os]"
220228
221229 interpreter .computer .run ("shell" , command , display = True )
222230
Original file line number Diff line number Diff line change 1- import sys
21import os
32import platform
43import subprocess
4+ import sys
55import time
6+
67import inquirer
78
89from interpreter import interpreter
910
1011
1112def get_ram ():
1213 import psutil
13- total_ram = psutil .virtual_memory ().total / (1024 * 1024 * 1024 ) # Convert bytes to GB
14+
15+ total_ram = psutil .virtual_memory ().total / (
16+ 1024 * 1024 * 1024
17+ ) # Convert bytes to GB
1418 return total_ram
1519
1620
1721def download_model (models_dir , models , interpreter ):
1822 # For some reason, these imports need to be inside the function
1923 import inquirer
20- import wget
2124 import psutil
25+ import wget
2226
2327 # Get RAM and disk information
2428 global get_ram
@@ -533,8 +537,16 @@ def list_ollama_models():
533537 time .sleep (2 )
534538 print ("Attempting to start OS control anyway...\n \n " )
535539
536- for pip_name in ["pip" , "pip3" ]:
537- command = f"{ pip_name } install open-interpreter[os]"
540+ for pip_combo in [
541+ ["pip" , "quotes" ],
542+ ["pip" , "no-quotes" ],
543+ ["pip3" , "quotes" ],
544+ ["pip" , "no-quotes" ],
545+ ]:
546+ if pip_combo [1 ] == "quotes" :
547+ command = f'{ pip_combo [0 ]} install "open-interpreter[os]"'
548+ else :
549+ command = f"{ pip_combo [0 ]} install open-interpreter[os]"
538550
539551 interpreter .computer .run ("shell" , command , display = True )
540552
@@ -582,4 +594,3 @@ def list_ollama_models():
582594 "**Warning:** In this mode, Open Interpreter will not require approval before performing actions. Be ready to close your terminal."
583595 )
584596 print ("" ) # < - Aesthetic choice
585-
Original file line number Diff line number Diff line change 169169 time .sleep (2 )
170170 print ("Attempting to start OS control anyway...\n \n " )
171171
172- for pip_name in ["pip" , "pip3" ]:
173- command = f"{ pip_name } install open-interpreter[os]"
172+ for pip_combo in [
173+ ["pip" , "quotes" ],
174+ ["pip" , "no-quotes" ],
175+ ["pip3" , "quotes" ],
176+ ["pip" , "no-quotes" ],
177+ ]:
178+ if pip_combo [1 ] == "quotes" :
179+ command = f'{ pip_combo [0 ]} install "open-interpreter[os]"'
180+ else :
181+ command = f"{ pip_combo [0 ]} install open-interpreter[os]"
174182
175183 interpreter .computer .run ("shell" , command , display = True )
176184
You can’t perform that action at this time.
0 commit comments