ModuleNotFoundError: No module named 'openai'

Question:
I’m getting the error:
Traceback (most recent call last):
File “main.py”, line 8, in
import openai # OpenAI’s GPT-3 language model library
ModuleNotFoundError: No module named ‘openai’
I can see that openai is in the packages when I open packages.


[**Repl link:**](https://replit.com/@LarrySankey/VoluminousAdolescentArchitect)
``` # Import the necessary modules and libraries import os # Provides access to operating system-dependent functionality import openai # OpenAI's GPT-3 language model library import requests # Library for making HTTP requests from bs4 import BeautifulSoup # Library for web scraping and parsing HTML/XML documents ```
1 Like

Did you pip install open ai

If you haven’t use pip install openai in the shell

2 Likes

Ok, thanks. I’m new to replit and my last repl for some reason pip install would not work. It’s working now.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.