Skip to content

Commit 2399df0

Browse files
authored
Merge pull request #1194 from CyanideByte/os-import-fix
Fix optional import crash and error
2 parents eeb167e + 32544d0 commit 2399df0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

interpreter/core/computer/display/display.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
import requests
1313
from ...utils.lazy_import import lazy_import
1414
from ..utils.recipient_utils import format_to_recipient
15-
import cv2
1615
from screeninfo import get_monitors # for getting info about connected monitors
1716

1817

1918
# Still experimenting with this
2019
# from utils.get_active_window import get_active_window
2120

2221
# Lazy import of optional packages
22+
cv2 = lazy_import("cv2")
2323
pyautogui = lazy_import("pyautogui")
2424
np = lazy_import("numpy")
2525
plt = lazy_import("matplotlib.pyplot")

interpreter/terminal_interface/profiles/defaults/01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def get_function_info(file_path):
216216
print("Attempting to start OS control anyway...\n\n")
217217

218218
for pip_name in ["pip", "pip3"]:
219-
command = f"{pip_name} install 'open-interpreter[os]'"
219+
command = f"{pip_name} install open-interpreter[os]"
220220

221221
interpreter.computer.run("shell", command, display=True)
222222

interpreter/terminal_interface/profiles/defaults/os.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
print("Attempting to start OS control anyway...\n\n")
171171

172172
for pip_name in ["pip", "pip3"]:
173-
command = f"{pip_name} install 'open-interpreter[os]'"
173+
command = f"{pip_name} install open-interpreter[os]"
174174

175175
interpreter.computer.run("shell", command, display=True)
176176

0 commit comments

Comments
 (0)