OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

Python 3.12 not supported

Open ayazwx opened this issue 1 year ago â€ĸ 11 comments

Commands I ran to install and run OpenDevin:

make build

ERROR: Successfully installed distlib-0.3.8 pipenv-2023.12.1 platformdirs-4.2.0 virtualenv-20.25.1 Using python: 3.11 Path to python: None Warning: Python 3.11 was not found on your system... Neither 'pyenv' nor 'asdf' could be found to install Python. You can specify specific versions of Python with: $ pipenv --python path/to/python make: *** [Makefile:19: build] Error 1

$ python --version

Python 3.12.2

ayazwx avatar Apr 04 '24 21:04 ayazwx

I did notice we're strictly checking 3.11, and not allowing 3.12 â˜šī¸

Worth fixing

rbren avatar Apr 04 '24 22:04 rbren

Relevant loc: https://github.com/OpenDevin/OpenDevin/blob/e70767c22697ed4fe81ef14e677dfccba8376ff8/Pipfile#L32

rbren avatar Apr 04 '24 22:04 rbren

Gonna leave this one open--we should be able to support 3.12 just fine. I think it's just not encoded properly

rbren avatar Apr 04 '24 22:04 rbren

pipenv does not have a good way to say >=3.11 I want to say this one waits for poetry.

foragerr avatar Apr 04 '24 23:04 foragerr

@ayazwx I guess it's fixed in the new main try to pull and let us know if there are any issues.

ps: Thanks @foragerr for the info 👌

anasdorbani avatar Apr 05 '24 01:04 anasdorbani

I'll close this issue if you don't have any problem

anasdorbani avatar Apr 05 '24 02:04 anasdorbani

problem fixed by the switch to poetry

anasdorbani avatar Apr 05 '24 02:04 anasdorbani

There is another error which is project try to use python 3.12:

make build
What's Next?
  1. Sign in to your Docker account → docker login
  2. View a summary of image vulnerabilities and recommendations → docker scout quickview ghcr.io/opendevin/sandbox
Installing Python dependencies...
Retrieving Poetry metadata

# Welcome to Poetry!

This will download and install the latest version of Poetry,
a dependency and package manager for Python.

It will add the `poetry` command to Poetry's bin directory, located at:

/home/fedora/.local/bin

You can uninstall at any time by executing this script with the --uninstall option,
and these changes will be reverted.

Installing Poetry (1.8.2): An error occurred. Removing partial environment.
Poetry installation failed.
See /home/fedora/Downloads/OpenDevin/poetry-installer-error-7sar_n9s.log for error logs.
make: *** [Makefile:19: build] Error 1
$ cat poetry-installer-error-7sar_n9s.log
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/lib64/python3.12/ensurepip/__main__.py", line 5, in <module>
    sys.exit(ensurepip._main())
             ^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/ensurepip/__init__.py", line 284, in _main
    return _bootstrap(
           ^^^^^^^^^^^
  File "/usr/lib64/python3.12/ensurepip/__init__.py", line 176, in _bootstrap
    whl = wheel_path.read_bytes()
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/pathlib.py", line 1019, in read_bytes
    with self.open(mode='rb') as f:
         ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/pathlib.py", line 1013, in open
    return io.open(self, mode, buffering, encoding, errors, newline)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib64/python3.12/ensurepip/_bundled/pip-24.0-py3-none-any.whl'

Traceback:

  File "<stdin>", line 923, in main
  File "<stdin>", line 562, in run

ayazwx avatar Apr 05 '24 04:04 ayazwx

@ayazwx I'll take a look at that today

anasdorbani avatar Apr 05 '24 08:04 anasdorbani

@ayazwx can you try this command in the terminal pip --version

anasdorbani avatar Apr 05 '24 16:04 anasdorbani

if pip exist try to upgrade you pip using pip install --upgrade pip

anasdorbani avatar Apr 05 '24 16:04 anasdorbani

Given that we fixed the original bug, I'm going to close this one.

@ayazwx can you open up a new issue and fill out the template if you're still having trouble?

rbren avatar Apr 07 '24 22:04 rbren