open-interpreter icon indicating copy to clipboard operation
open-interpreter copied to clipboard

Running it from intellij?

Open guiramos opened this issue 2 years ago • 2 comments

How I can run it from within Intellij?

I was able to shell the poetry env, tried to run the cli.py (aborts without error) tried to run the interpreter.py but it can resolve the .cli path.

ImportError: attempted relative import with no known parent package

What is the dark magic here?

guiramos avatar Sep 07 '23 00:09 guiramos

Thanks for reporting. Please see if the suggestions #15 solves your problem.

jordanbtucker avatar Sep 08 '23 16:09 jordanbtucker

@jordanbtucker @KillianLucas

Yes, I am already doing that, but through changing the code of interpreter.py which is not ideal because every time there's an official code change in the main branch and we pull, there's a conflict.

Relative imports in Python are in pain and they should be avoided, in most cases.

So, maybe it's worth pursuing a more standard approach not only to the imports but also to the app start up with a main method, that can also be called by poetry(great choice by the way).

If you guys want, I can make a PR with that.

guiramos avatar Sep 08 '23 17:09 guiramos

Closing this stale issue. Please create a new issue if there's still trouble running with intellij. Thanks!

MikeBirdTech avatar Mar 18 '24 19:03 MikeBirdTech