Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

No module named openai

$
0
0

I've installed openai on my laptop with pip install openai.

Have installed on my laptop and after installed on the same folder where my code file is. But when I try to run the code I get ImportError: No module named openai

This is the code from the file. Pretty simple:

import openaiopenai.api_key = API_KEYprompt = "Say this is a test"response = openai.Completion.create(    engine="text-davinci-001", prompt=prompt, max_tokens=6)print(response)

What am I doing wrong?


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>