Can someone help me with CLI?

Hello everyone,

I am currently developing a GPT-3 based Chatbot and i wanted to fine tune it with some Data i got. Unfortunatly i havent even made it to the part, where fine tuning would start.
I am using windows, and want to use the CMD Shell to work with GPT-3. For this i can run the first command from the fine tuning guide:

pip install --upgrade openai

But the second command, which needs to be set somehow can’t be run neither in python nor in the shell:


I understood, that i need to set my key as an environment variable, but i don’t know how this is done under windows. I know how to set normal envirnoment variables, but not keys to be used by the CMD.

When continuing the guide i stumble upon another problem, which is the execution of commands such as:

openai tools fine_tunes.prepare_data -f <LOCAL_FILE>

even though i installed openai via pip, it is not magically part of my shell.

Am I getting something compleatly wrong, because i am starting to believe this tutorial is for Linux only and i need some other shell to even work with GPT-3.

Kind regards


Hi Fabian,

a few weeks ago I had the same problems. I struggled for half a day but failed to perform fine tuning in Windows.
Here is my solution.

  1. You need to convert your data from Windows UTF-8 BF to UTF-8.
    I did it with Windows Editor. It has the ability to write Unix UTF-8.

  2. is an online pyton editor (Unix) here you can upload your data and perform fine tuning exactly as described in the documentation.

I made several models this way. :slight_smile:

I hope this can help you.


Solution is: Don’t use windows. I installed a Linux Subsystem for Windows and got Ubuntu 20.X (something) to run. There it worked flawlessly.

1 Like