OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

Fix environmental issues related to python/pip/brew/npm etc.

Open xcodebuild opened this issue 1 year ago • 6 comments
trafficstars

  • use homebrew to install pipenv on macOS, fix https://github.com/OpenDevin/OpenDevin/issues/544
  • use python3 if python is not available (e.g. on macOS)

xcodebuild avatar Apr 03 '24 13:04 xcodebuild

As someone who constantly has a broken python install on OSX I appreciate this PR.

Won't this require that the user already have homebrew installed? I'm not sure it ubiquitous enough to be an assumed dependency.

Indirectly Related: https://github.com/OpenDevin/OpenDevin/pull/481

spuder avatar Apr 03 '24 19:04 spuder

I feel like we should try for pip install pipenv before falling back to homebrew. But maybe it doesn't matter?

rbren avatar Apr 04 '24 03:04 rbren

As someone who constantly has a broken python install on OSX I appreciate this PR.

Won't this require that the user already have homebrew installed? I'm not sure it ubiquitous enough to be an assumed dependency.

Indirectly Related: #481

Good suggestion, currently trying to check for the existence of brew before use, if not, remind the user to install.

xcodebuild avatar Apr 04 '24 06:04 xcodebuild

I think it makes sense to do this, the current overall logic is:

  1. Check whether python or python3 exists, prioritize python and fallback to python3 if neither exists, then give an error
  2. Check if pipenv exists, if it does, skip it
  3. macOS users try to install pipenv with pip, if it fails, fallback to use homebrew (if the current user has not installed homebrew, it will fail and remind the user)
  4. Other operating systems still use pip for installation

xcodebuild avatar Apr 04 '24 06:04 xcodebuild

Added additional detection for npm and nodejs for https://github.com/OpenDevin/OpenDevin/issues/634

xcodebuild avatar Apr 04 '24 06:04 xcodebuild

Simillar issue. My wsl is saying cannot find python. Had to find and replace python to python3 in Makefile to fix this. Maybe do something like alias python=python3 to fix this? (Did not work when I added this line in makefile for some reason)

touhidurrr avatar Apr 04 '24 19:04 touhidurrr

can you pls pull the new main and try?

anasdorbani avatar Apr 05 '24 02:04 anasdorbani

can you pls pull the new main and try?

The main branch has already switched to poetry, it seems this PR is no longer necessary, I'll close it for now.

xcodebuild avatar Apr 05 '24 02:04 xcodebuild

Enjoy! if you faced any issues let me know 👌

anasdorbani avatar Apr 05 '24 02:04 anasdorbani

Enjoy! if you faced any issues let me know 👌

Now there is no python not found error. But the build is never finishing. My laptop is running out of storage because this project is installing gigabytes of random nvidia packages for no reason as I only intend to try out opendevin with my OpenAI keys and my laptop has no external gpu to begin with (using APU).

And I am not sure why do you need GPU support to being with when you are supposed to host the models elsewhere then use it with OpenDevin.

touhidurrr avatar Apr 05 '24 04:04 touhidurrr

Can you create a new issue for that pls I can try to figure it out

anasdorbani avatar Apr 05 '24 08:04 anasdorbani

@dorbanianas #766

touhidurrr avatar Apr 05 '24 12:04 touhidurrr