when importing openai python sdk in a renpy project
init python:
from openai import OpenAI
This error appear
I'm sorry, but an uncaught exception occurred. While running game code: File "game/script.rpy", line 22, in script init python: File "game/script.rpy", line 27, in <module> from openai import OpenAI ModuleNotFoundError: No module named 'pydantic_core._pydantic_core'
The full traceback can be found here
I installed the Openai library using
pip install --target game/python-packages openai
I tried installing the pydantic core and pydantic-package via pip
pip install --target game/python-packages pydantic-core
pip install --target game/python-packages pydantic
I also tried deleting all the packages and installing them again but still no avail
It's only an issue with the openai package
the other installed packages work fine
I can see both pydantic and pydantic core package in the python-packages folder
The Pydantic-core version is 2.16.3
and the pydantic version is 2.6.4