gpt-engineer
gpt-engineer copied to clipboard
Problem with a new installation
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
It seems you are operating on Python3.8. Try updating your python version first.
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
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).
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
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
If you wish to reopen the issue please do following the new issue template.