gpt-engineer icon indicating copy to clipboard operation
gpt-engineer copied to clipboard

Problem with a new installation

Open MERP-Solutions opened this issue 1 year ago • 4 comments

I have this problem after installing it with pip :

Traceback (most recent call last):
  File "/websites/gpt-engineer/gpt_eng/bin/gpt-engineer", line 5, in <module>
    from gpt_engineer.main import app
  File "/websites/gpt-engineer/gpt_eng/lib/python3.8/site-packages/gpt_engineer/main.py", line 10, in <module>
    from gpt_engineer.ai import AI
  File "/websites/gpt-engineer/gpt_eng/lib/python3.8/site-packages/gpt_engineer/ai.py", line 8, in <module>
    class AI:
  File "/websites/gpt-engineer/gpt_eng/lib/python3.8/site-packages/gpt_engineer/ai.py", line 40, in AI
    def next(self, messages: list[dict[str, str]], prompt=None):
TypeError: 'type' object is not subscriptable

It's a vanilla and fresh installation.

EDIT: I also tried with the "unstable" release option to install and got the same error

MERP-Solutions avatar Jun 19 '23 19:06 MERP-Solutions

It seems you are operating on Python3.8. Try updating your python version first.

Sentexi avatar Jun 19 '23 19:06 Sentexi

I'm getting the exact same error on a fresh install using Python 3.11 Traceback (most recent call last): File "/home/ubuntu/Desktop/gpt/gpt-engineer/gpt_engineer/main.py", line 10, in from gpt_engineer.ai import AI File "/home/ubuntu/Desktop/gpt/gpt-engineer/gpt_engineer/ai.py", line 8, in class AI: File "/home/ubuntu/Desktop/gpt/gpt-engineer/gpt_engineer/ai.py", line 40, in AI def next(self, messages: list[dict[str, str]], prompt=None): TypeError: 'type' object is not subscriptable

alyter avatar Jun 19 '23 20:06 alyter

Also got this issue so I clone the repo and then pip install gpt-engineer. Are you using anaconda by any chance ? I had issues when I was using it with vscode but it was working when I use it outside vscode (even with the right interpreter on vscode).

juarezjl avatar Jun 19 '23 21:06 juarezjl

I manage to run with Conda

# cd into the repo root folder
cd gpt-engineer
OPENAI_API_KEY=... python gpt_engineer/main.py projects/example

gianpaj avatar Jun 20 '23 12:06 gianpaj

Guys, after installing gpt-enginner via pip, + Dl the source code I just install requirement into gpt-enginner folder (GitHub) like : gpt-engineer> pip install -r requirements.txt Then, Create an empty folder , inside the repo, you can run: cp -r projects/example/ projects/my-new-project Fill in the main_prompt file in your new folder Run: gpt-engineer projects/my-new-project Hope will help ! AK

aka9871 avatar Jun 21 '23 09:06 aka9871

If you wish to reopen the issue please do following the new issue template.

patillacode avatar Jun 21 '23 12:06 patillacode