brython-dev / brython

Brython (Browser Python) is an implementation of Python 3 running in the browser
BSD 3-Clause "New" or "Revised" License
6.36k stars 507 forks source link

cannot import name 'Openai' from 'openai' #2482

Open lishaozheng opened 1 month ago

lishaozheng commented 1 month ago

<!doctype html>

报错: brython.js:11026 Traceback (most recent call last): File "Brython-3.12.4/index.html#main", line 3, in from openai import Openai ImportError: cannot import name 'Openai' from 'openai' (http://127.0.0.1:8848/Brython-3.12.4/openai.py)

PierreQuentel commented 3 weeks ago

The package is not in the standard distribution, please read section "installing a CPython package" in the documentation.

Note that Brython can only handle Python code, if your package has scripts written in C it will not be supported.