OpenInterpreter / 01

The open-source language model computer
http://openinterpreter.com/01
GNU Affero General Public License v3.0
4.75k stars 468 forks source link

while running zero one in Ubuntu Linux, getting error given #242

Closed GSrinivasKishanLal closed 2 months ago

GSrinivasKishanLal commented 2 months ago

Describe the bug Getting this below error when running, ○

Starting...

Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To Reproduce Steps to reproduce the behavior:

  1. Give "poetry run 01 --local" in shell

Screenshots Screenshot from 2024-04-16 10-26-35

Desktop (please complete the following information):

Kindly suggest

ai-Ev1lC0rP commented 2 months ago

``my suggestion would be to run and install some type of venv (your screenshot was cut off so i didnt see that you were if you are). You can then create an interpreter environment using python 3.10 (I've had good luck with python 3.10.11). Then honestly thinking about it most of the time i'll just run pip install open-interpreter and then i'll install all of the pre-reqs per the documentation. Then i'm off to the races.

I've installed this on windows, wsl, linux, and i primarily use it on my macbooks. It works the best on those. I was reading about memory retention last night and that's the rabbit hole i'm going down today.

If you want to, you can try this.


wget https://repo.anaconda.com/archive/Anaconda3-2024.02-1-Linux-x86_64.sh ; sudo bash ./Anaconda3-2024.02-1-Linux-x86_64.sh 
#download and install the latest anaconda from anaconda answer yes and i usually run the base env in my shell but to each their own. 

# Create a conda environment named 'interpreter' with Python 3.10
conda create -n interpreter python=3.10

# Activate the 'interpreter' environment
conda activate interpreter

# Install the 'open-interpreter' package using pip
pip install open-interpreter

# Install the -os modules for the 'interpreter' environment
interpreter -os

# Answer 'yes' when prompted to install the os modules

# clone the 01 repo
git clone https://github.com/OpenInterpreter/01.git

# Navigate to the directory ./01/software/source/server
cd ./01/software/source/server

# Follow the installation instructions, including any prerequisites, since we are in the 'interpreter' conda environment

And, hey. This might be wrong, but this has been working for me on just about any machine. ¯_(ツ)_/¯ I've run into a lot of the errors like you have above ( i didn't save them but i do remember the bootsrap frozen error.)

Creating the nested venv seems to resolve a lot of the conflicting python package dependencies. you can do the same with python -m venv venv or even ask gpt to create you a dockerfile to go down that path. . .

Alternatively you can skip the whole installing interpreter and just use the clean python 10 env after you create it.

proofing this quick before i'm submitting ... it could likely just be a skil since i wrote pretty detailed instructions or a shell script.

GSrinivasKishanLal commented 2 months ago

Thank you @ai-Ev1lC0rP for you kind reply, but I am still getting the issue when I run the below code

poetry run 01 --local

Full verbatim of the error I get in shell has been given below:

Starting...

Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/home/aerpace-admin/open_interpreter/zero_1/01/software/start.py", line 8, in from source.server.server import main File "/home/aerpace-admin/open_interpreter/zero_1/01/software/source/server/server.py", line 130, in interpreter = configure_interpreter(interpreter) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/aerpace-admin/open_interpreter/zero_1/01/software/source/server/i.py", line 216, in configure_interpreter import(package) File "/home/aerpace-admin/.cache/pypoetry/virtualenvs/01os-5cbHcSBA-py3.11/lib/python3.11/site-packages/pywinctl/init.py", line 27, in from ._main import (Re, Window, checkPermissions, getActiveWindow, File "/home/aerpace-admin/.cache/pypoetry/virtualenvs/01os-5cbHcSBA-py3.11/lib/python3.11/site-packages/pywinctl/_main.py", line 14, in from pymonctl import findMonitorsAtPoint, getAllMonitors, getAllMonitorsDict File "/home/aerpace-admin/.cache/pypoetry/virtualenvs/01os-5cbHcSBA-py3.11/lib/python3.11/site-packages/pymonctl/init.py", line 22, in from ._main import (getAllMonitors, getAllMonitorsDict, getMonitorsCount, getPrimary, File "/home/aerpace-admin/.cache/pypoetry/virtualenvs/01os-5cbHcSBA-py3.11/lib/python3.11/site-packages/pymonctl/_main.py", line 916, in from ._pymonctl_linux import (_getAllMonitors, _getAllMonitorsDict, _getMonitorsCount, _getPrimary, File "/home/aerpace-admin/.cache/pypoetry/virtualenvs/01os-5cbHcSBA-py3.11/lib/python3.11/site-packages/pymonctl/_pymonctl_linux.py", line 22, in from ewmhlib import defaultEwmhRoot, getProperty, getPropertyValue, getRoots, getRootsInfo, Props File "/home/aerpace-admin/.cache/pypoetry/virtualenvs/01os-5cbHcSBA-py3.11/lib/python3.11/site-packages/ewmhlib/init.py", line 23, in from ._main import (displaysCount, getDisplays, getDisplaysInfo, getRoots, getRootsInfo, File "/home/aerpace-admin/.cache/pypoetry/virtualenvs/01os-5cbHcSBA-py3.11/lib/python3.11/site-packages/ewmhlib/_main.py", line 4, in from ._ewmhlib import (displaysCount, getDisplays, getDisplaysInfo, getRoots, getRootsInfo, File "/home/aerpace-admin/.cache/pypoetry/virtualenvs/01os-5cbHcSBA-py3.11/lib/python3.11/site-packages/ewmhlib/_ewmhlib.py", line 30, in defaultDisplay: Xlib.display.Display = Xlib.display.Display() ^^^^^^^^^^^^^^^^^^^^^^ File "/home/aerpace-admin/.cache/pypoetry/virtualenvs/01os-5cbHcSBA-py3.11/lib/python3.11/site-packages/Xlib/display.py", line 80, in init self.display = _BaseDisplay(display) ^^^^^^^^^^^^^^^^^^^^^ File "/home/aerpace-admin/.cache/pypoetry/virtualenvs/01os-5cbHcSBA-py3.11/lib/python3.11/site-packages/Xlib/display.py", line 62, in init display.Display.init(*(self, ) + args, **keys) File "/home/aerpace-admin/.cache/pypoetry/virtualenvs/01os-5cbHcSBA-py3.11/lib/python3.11/site-packages/Xlib/protocol/display.py", line 129, in init raise error.DisplayConnectionError(self.display_name, r.reason) Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'Authorization required, but no authorization protocol specified\n'

any idea to fix it would be much appreciated, Thank you in advance

ai-Ev1lC0rP commented 2 months ago

@GSrinivasKishanLal 🏄🏼 from ._main import (Re, Window, checkPermissions, getActiveWindow,

looks like permissions on the screen mixed with

Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'Authorization required, but no authorization protocol specified\n' I saw where i can run an 01 server and an 01 client and i've got both functioning but i want to run the 'server' onmy 4090 so i'm going to install interpreter and 01 in my WSL Ubuntu env tonight.

*** I did notice in my response above i advised to install python 3.10 but i was working on another project and must have mixed them up.

You need to install python 3.11 per the README. (My fault on that, i thought about that laying in bed the other night)

Buuuuut having said all of that, all depending on how you have the enviornment set up. You need to follow the instructions as far as pre-reqs go.

Candidly i havent run the linux variant of the 01 software but i have an ubuntu laptop sitting right next to me that i'll give a shot.

If you are trying to do like VNC or SSH -> 01 run through bash. ...I think you might have a bad time with how it enstaciates the screen and parsing those screenshots... but it's also early it could be a number of factors.

If you are using anaconda, things do tend to get weird with how it handles venv's->conda mixed with python->venv so then you end up a venv within a venv and if you activate them in different orders........ i digress on that.... but my point is! if i were you. here's what i would do

conda create -n interpreter python=3.11
#(Hit Y for overwriting the existing if you already have an instance named 'interpreter')
#(Hit Y to install the packages) 
conda activate interpreter
sudo apt-get install portaudio19-dev ffmpeg cmake
git clone https://github.com/OpenInterpreter/01.git
cd software
poetry install
poetry run 01 --local

You must have ollama or another LLM provider installed, running, and ready to accept connections if you are running local

Good luck!