gpt-engineer-org / gpt-engineer

Platform to experiment with the AI Software Engineer. Terminal based. NOTE: Very different from https://gptengineer.app
MIT License
52.55k stars 6.83k forks source link

Problem with a new installation #217

Closed MERP-Solutions closed 1 year ago

MERP-Solutions commented 1 year ago

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

Sentexi commented 1 year ago

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

alyter commented 1 year ago

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

juarezjl commented 1 year ago

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).

gianpaj commented 1 year ago

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
aka9871 commented 1 year ago

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

patillacode commented 1 year ago

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