Skip to content

Instantly share code, notes, and snippets.

@mberman84
Last active March 13, 2025 20:59
Show Gist options
  • Save mberman84/c565061fef57b692919d8856f8e30ffa to your computer and use it in GitHub Desktop.
Save mberman84/c565061fef57b692919d8856f8e30ffa to your computer and use it in GitHub Desktop.
ChatDev Installation
# need to have conda installed
# these are instructions for macOS
git clone https://github.com/OpenBMB/ChatDev.git
conda create -n ChatDev_conda_env python=3.9 -y
conda activate ChatDev_conda_env
cd ChatDev
pip3 install -r requirements.txt
set OPENAI_API_KEY=your_key
python run.py --task "[description_of_your_idea]" --name "[project_name]"
python3 online_log/app.py
@stevesgonefishin
Copy link

Is there a gistfile for windows?

@AlexJ-StL
Copy link

AlexJ-StL commented Sep 29, 2023

@stevesgonefishin Its the same for Windows with the exception that I set the OpenAPI key env by entering it through the System Properties>Env Variables, but if you have another way then you do you. Additionally, their readme is more than sufficient to get it installed. Ive had it installed on my Win 11 laptop for over a week. It works wonderfully.

@roguecamp
Copy link

I have windows 10 and have verified the OPEN_AI_KEY variable is set correctly but consistently get the error message:
result = fn(*args, **kwargs)
File "C:\Users\Campbell\ChatDev\camel\utils.py", line 147, in wrapper
raise ValueError('OpenAI API key not found.')

@Korner83
Copy link

I have windows 10 and have verified the OPEN_AI_KEY variable is set correctly but consistently get the error message: result = fn(*args, **kwargs) File "C:\Users\Campbell\ChatDev\camel\utils.py", line 147, in wrapper raise ValueError('OpenAI API key not found.')

setx OPENAI_API_KEY “” or set OPENAI_API_KEY=
after that:
echo %OPENAI_API_KEY%
to check your key's visibility. also on win10 you might need a restart

@roguecamp
Copy link

Thanks @Korner83 for the advice... yup tried all that successfully echo the key and restarted. The error persists... it's a mystery.

@Korner83
Copy link

Thanks @Korner83 for the advice... yup tried all that successfully echo the key and restarted. The error persists... it's a mystery.

If you use conda with virtual environment then you might need to set it in that environment as well.

@roguecamp
Copy link

It turned out to be much simpler... I had the env var set as OPEN_API_KEY instead of OPENAI_API_KEY doh! thanks so much tho

@Korner83
Copy link

It turned out to be much simpler... I had the env var set as OPEN_API_KEY instead of OPENAI_API_KEY doh! thanks so much tho

Yeyy I'm glad you solved it!

@jermaine-24x7
Copy link

jermaine-24x7 commented Oct 9, 2023

For line 8, I had to use:

export OPENAI_API_KEY=<your_key>

On MacOs(11.6.1) Terminal.

Ps - Great video. Thank you.

@MoNarchEnterprises
Copy link

If you are in your conda environment for windows use
conda env config vars set OPENAI_API_KEY="API_KEY"
to set the environment variables

@jez120
Copy link

jez120 commented Nov 2, 2023

anyone is getting this error(mac m1), tried installation 10 times already 3 hrs of googling with AI help how to solve this and still there :
(ChatDev_conda_env) adam@adam ChatDev % python run.py --task "[a todo app where users can add todo items, change todo items to complete them and delete and edit todo items]" --name "[todo]"
Traceback (most recent call last):
File "/Users/adam/ChatDev/run.py", line 82, in
chat_chain = ChatChain(config_path=config_path,
File "/Users/adam/ChatDev/chatdev/chat_chain.py", line 70, in init
incremental_develop=check_bool(self.config["incremental_develop"]))
KeyError: 'incremental_develop'
(ChatDev_conda_env) adam@adam ChatDev %

@yunwushanhe
Copy link

anyone is getting this error(mac m1), tried installation 10 times already 3 hrs of googling with AI help how to solve this and still there : (ChatDev_conda_env) adam@adam ChatDev % python run.py --task "[a todo app where users can add todo items, change todo items to complete them and delete and edit todo items]" --name "[todo]" Traceback (most recent call last): File "/Users/adam/ChatDev/run.py", line 82, in chat_chain = ChatChain(config_path=config_path, File "/Users/adam/ChatDev/chatdev/chat_chain.py", line 70, in init incremental_develop=check_bool(self.config["incremental_develop"])) KeyError: 'incremental_develop' (ChatDev_conda_env) adam@adam ChatDev %

I have also encountered this error and haven't found a solution yet. Have you resolved it?

@f-elephant
Copy link

Hello there I have an issue with a (I'm absolutely new) "conda create -n ChatDev_conda_env python=3.9 -y
conda activate ChatDev_conda_env" (conda create -n ChatDev_conda_env python=3.9 -y
'conda' is not recognized as an internal or external command,
operable program or batch file.) what should I do?

@DiegoRenau
Copy link

just an update: python3 visualizer/app.py to load the server and access to the website.
Great video!!

@Sam-3344
Copy link

Can someone please help me with this error?

What do I do for this error, while creating the todo app -
TypeError: init() got an unexpected keyword argument 'proxies'

@Sam-3344
Copy link

just an update: python3 visualizer/app.py to load the server and access to the website. Great video!!

I'm getting this error, can you please help?
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Apps > Advanced app settings > App execution aliases.

@Gl1tchblade
Copy link

just an update: python3 visualizer/app.py to load the server and access to the website. Great video!!

I'm getting this error, can you please help? Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Apps > Advanced app settings > App execution aliases.

Dude its been like 2 years but I'll try to help can you remind me what this is about again?

@Sam-3344
Copy link

just an update: python3 visualizer/app.py to load the server and access to the website. Great video!!

I'm getting this error, can you please help? Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Apps > Advanced app settings > App execution aliases.

Dude its been like 2 years but I'll try to help can you remind me what this is about again?

Hey thanks man!

I was trying to install this ChatDev AI app. And got this error while running this command - python3 online_log/app.py
I'm using this tutorial for reference - https://www.youtube.com/watch?v=yoAWsIfEzCw&ab_channel=MatthewBerman

I've pasted the error in the old comment. And I tried checking this online & in a discord server too, but no luck.
Please let me know if you know how to resolve this.

@Gl1tchblade
Copy link

Looks like your system isn’t recognizing Python. Here’s a few things you can try:

  1. Check if Python is Installed

Open Command Prompt (cmd) or PowerShell and type:

python --version

or

python3 --version

If it says something like "Python not found," then you need to install it from python.org.

  1. Check If Python is in Your System Path

If Python is installed but still not recognized, it might not be in your system’s PATH.

Search for "Edit the system environment variables" in Windows.

Click "Environment Variables", scroll down to System Variables, find Path, and click Edit.

Click New and add the path to where Python is installed. It’s usually something like:

C:\Users\YourUsername\AppData\Local\Programs\Python\Python39\

  1. Enable Python Execution Aliases

Go to Settings > Apps > Advanced App Settings > App execution aliases.

Make sure Python.exe and Python3.exe are turned ON.

  1. Try Running Python with Full Path

Instead of python3 online_log/app.py, try running:

C:\Users\YourUsername\AppData\Local\Programs\Python\Python39\python.exe online_log/app.py

Replace the path with your actual Python installation directory.

After trying all this tell me if you have more errors this should fix it though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment