1

I'm trying to make a custom ChatGPT bot in Visual Studio Code and I'm getting the error Import "OpenAI" could not be resolved Pylance(reportMissingImports) the error code is reportMissingImports [boolean or string, optional]: Generate or suppress diagnostics for imports that have no corresponding imported python file or type stub file. The default value for this setting is "error". I'm relatively new to coding so if anyone could give me a nudge in the right direction.

I tried to switch files from a custom file to the download files but that didn't work I also tried opening a terminal and typing pip3 install openai but that still didn't work

Ajeet Verma
  • 2,938
  • 3
  • 13
  • 24
  • 1
    _also tried opening a terminal and typing pip3 install openai but that still didn't work_ Okay, so what **did** it do? – John Gordon May 26 '23 at 02:23
  • Welcome to Stack Overflow. Please give us more details and provide a [mre]. – SimonUnderwood May 26 '23 at 02:43
  • @JohnGordon When I typed pip3 install open ai it gave me the error "pip3 : The term 'pip3' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + pip3 install openai + ~~~~ + CategoryInfo : ObjectNotFound: (pip3:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException" – Liam Whitsitt May 26 '23 at 02:55
  • Try `pip` instead of `pip3`. – John Gordon May 26 '23 at 02:56
  • @JohnGordon I also did that and it gave me the same error. – Liam Whitsitt May 26 '23 at 03:04
  • Then either you don't have `pip` installed at all, or it's installed somewhere that is not on your PATH variable. – John Gordon May 26 '23 at 03:05

0 Answers0