0

I am trying to follow the tutorial Fine tuning classification example and I can't seem to be able to access OpenAI's CLI through my document.

Specifically, I can't run the code below:

!openai tools fine_tunes.prepare_data -f sport2.jsonl -q

I have followed the right steps to install (and update) the OpenAI package:

!pip install --upgrade openai

But it still does not work. I have searched this site for answers, but that hasn't helped. I am running Windows 10.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
TM091994
  • 5
  • 3
  • 1
    It may not help here, but you'll have a much easier time going forward with modern Jupyter if you cease using an exclamation point with `pip install` commands in modern Jupyter and use the magic command that was added to make sure installation occurs in the right environment. Specifically `%pip install --upgrade openai`. Anything saying to use an exclamation point is no longer using current best practices and so should be considered outdated. See [here](https://discourse.jupyter.org/t/why-users-can-install-modules-from-pip-but-not-from-conda/10722/4?u=fomightez) for more about install magic. – Wayne Apr 12 '23 at 19:45
  • [Here](https://stackoverflow.com/a/75692744/8508004) says for Windows to use the command prompt to run equivalent code and not in Jupyter. Your mileage may vary. I don't use Windows. Or maybe check out some of the suggestions [here in this thread](https://stackoverflow.com/a/75846546/8508004). Or [here](https://stackoverflow.com/a/75682707/8508004). – Wayne Apr 12 '23 at 20:03

1 Answers1

0

It turns out that there was a problem with the initial installation of "openai". For future reference, simply uninstall the openai package and reinstall it with pip.

TM091994
  • 5
  • 3