0

I am trying to use a tool from Openai (train a data model).

I installed openai and now try to execute this command:

/Users/finnborchers/Library/Python/3.8/lib/python/site-packages/openai tools fine_tunes.prepare_data -f /Users/finnborchers/Desktop/Code/GPT3_Training_data/training.jsonl

I get this error:

zsh: permission denied: /Users/finnborchers/Library/Python/3.8/lib/python/site-packages/openai

I had the same problem from this article, but now I am stuck:

openai command not found (mac)

I am new to the terminal commands, but here is the output of echo $PATH:

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/finnborchers/Flutter_api/flutter/bin

To allow execution I tried this command:

sudo chmod +x /Users/finnborchers/Library/Python/3.8/lib/python/site-packages/openai

But then nothing happens (There is no feedback message) and I still get the permission denied message. Maybe the chmod did not work because of the PATH?

I am thankful for any help!

Finn
  • 161
  • 1
  • 14

2 Answers2

0

Solution: I had to run the first installation with sudo.

Finn
  • 161
  • 1
  • 14
0

I would recommend setting up a executable script in /usr/local/bin.

To do so run the following command:

sudo sh -c 'echo python3 "$(python3 -m site --user-site)"/openai/_openai_scripts.py \$\@ > /usr/local/bin/openai'

Then make it executable:

sudo chmod +x /usr/local/bin/openai

Now you don't always have to specify the path to the python script, you can simply run openai --help from anywhere.

Kevin Goedecke
  • 1,553
  • 2
  • 14
  • 26