How to Install GPT Engineer (quick tutorial)
A quick guide to setting up gpt-engineer on your computer
This guide provides a step-by-step tutorial on installing GPT Engineer on a Windows PC. By following these instructions, you'll be able to set up GPT Engineer from the official GitHub repository and start generating codebases based on text prompts.
Useful resources:
how to install gpt-engineer (article)
how to install gpt engineer on pc (youtube video)
another video on how to setup gpt-engineer (youtube)
Prerequisites: Before installing GPT Engineer, make sure you have the necessary software and accounts in place.
Install Git: To clone the GPT Engineer project, download Git from the official website and follow the installation steps.
Install Python: GPT Engineer relies on Python, so ensure you have the latest version installed on your system. Download it from the official Python website and make sure commands like python, python3, pip, and pip3 are executable.
Install Visual Studio Code (Optional): While not mandatory, Visual Studio Code is a recommended IDE for editing code. You can choose any other preferred IDE or text editor as well.
Register for an OpenAI Account: Sign up for an OpenAI account and log in. You'll need to set up a payment plan before generating your GPT 4 API key.
Generate GPT 4 API Key: Once you're logged in, access the API keys section in your OpenAI account settings. Generate a new secret key and save it securely. This key will be needed during the installation process.
Installing GPT Engineer
To install GPT Engineer on your Windows PC, follow these steps:
Clone GPT Engineer from GitHub: Go to the GPT Engineer GitHub repository and copy the project's URL. Open the command prompt (cmd.exe) and clone the project using the command:
git clone <project-URL>This will clone the GPT Engineer project to your local machine.
Install Project Requirements: Navigate to the cloned project's directory using the command prompt. Install the project's dependencies by running the command:
pip install -r requirements.txtConfigure GPT Engineer:
To configure GPT Engineer with your GPT 4 API key, follow these steps:
Windows - Command Prompt
set OPENAI_API_KEY=<key>Windows - PowerShell
$env:OPENAI_API_KEY=<key>Linux/macOS
export OPENAI_API_KEY=<key>Create a GPT Engineer Project:
To start a new GPT Engineer project, follow these steps:
Create a New Project:
Use the command prompt to create a new project folder. For example, mkdir <project-name>. Open the project folder in your preferred IDE or text editor.
Define the Main Prompt: Inside the project folder, create a new file named main_prompt (without extensions). Write your desired instructions for GPT Engineer in this file and save it.
Run Your GPT Engineer Project: To generate the codebase based on your main prompt, follow these steps:
Execute the Command: Open the command prompt or terminal and navigate to the gpt-engineer directory. Now run the command:
python -m gpt_engineer.main <project-name>This will run your GPT Engineer project. If you encounter an error, try using python3 instead of python. Note: If you encounter any errors related to Python environment setup, refer to web development tutorials to resolve them accordingly.


i got the following error:
C:\Users\mario\Desktop\Dev\gpt-engineer\gpt_engineer> python -m gpt_engineer.main
INFO:openai:error_code=model_not_found error_message="The model 'gpt-4' does not exist" error_param=model error_type=invalid_request_error message='OpenAI API error received' stream_error=False
Model gpt-4 not available for provided API key. Reverting to gpt-3.5-turbo. Sign up for the GPT-4 wait list here: https://openai.com/waitlist/gpt-4-api
INFO:openai:error_code=None error_message='You exceeded your current quota, please check your plan and billing details.' error_param=None error_type=insufficient_quota message='OpenAI API error received' stream_error=False
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\mario\Desktop\Dev\gpt-engineer\gpt_engineer\main.py", line 69, in <module>
app()
File "C:\Users\mario\Desktop\Dev\gpt-engineer\gpt_engineer\main.py", line 64, in main
messages = step(ai, dbs)
^^^^^^^^^^^^^
File "C:\Users\mario\Desktop\Dev\gpt-engineer\gpt_engineer\steps.py", line 39, in clarify
messages = ai.next(messages, user)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mario\Desktop\Dev\gpt-engineer\gpt_engineer\ai.py", line 47, in next
response = openai.ChatCompletion.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mario\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\openai\api_resources\chat_completion.py", line 25, in create
return super().create(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mario\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 153, in create
response, _, api_key = requestor.request(
^^^^^^^^^^^^^^^^^^
File "C:\Users\mario\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\openai\api_requestor.py", line 298, in request
resp, got_stream = self._interpret_response(result, stream)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mario\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\openai\api_requestor.py", line 700, in _interpret_response
self._interpret_response_line(
File "C:\Users\mario\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\openai\api_requestor.py", line 763, in _interpret_response_line
raise self.handle_error_response(
openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details.