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):
215
215
time .sleep (2 )
216
216
print ("Attempting to start OS control anyway...\n \n " )
217
217
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]"
220
228
221
229
interpreter .computer .run ("shell" , command , display = True )
222
230
Original file line number Diff line number Diff line change 1
- import sys
2
1
import os
3
2
import platform
4
3
import subprocess
4
+ import sys
5
5
import time
6
+
6
7
import inquirer
7
8
8
9
from interpreter import interpreter
9
10
10
11
11
12
def get_ram ():
12
13
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
14
18
return total_ram
15
19
16
20
17
21
def download_model (models_dir , models , interpreter ):
18
22
# For some reason, these imports need to be inside the function
19
23
import inquirer
20
- import wget
21
24
import psutil
25
+ import wget
22
26
23
27
# Get RAM and disk information
24
28
global get_ram
@@ -533,8 +537,16 @@ def list_ollama_models():
533
537
time .sleep (2 )
534
538
print ("Attempting to start OS control anyway...\n \n " )
535
539
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]"
538
550
539
551
interpreter .computer .run ("shell" , command , display = True )
540
552
@@ -582,4 +594,3 @@ def list_ollama_models():
582
594
"**Warning:** In this mode, Open Interpreter will not require approval before performing actions. Be ready to close your terminal."
583
595
)
584
596
print ("" ) # < - Aesthetic choice
585
-
Original file line number Diff line number Diff line change 169
169
time .sleep (2 )
170
170
print ("Attempting to start OS control anyway...\n \n " )
171
171
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]"
174
182
175
183
interpreter .computer .run ("shell" , command , display = True )
176
184
You can’t perform that action at this time.
0 commit comments