python 3.12.7 Pydantic issue on mod_wsgi server module not found #1856
Unanswered
LaZyProjectsUK
asked this question in
Q&A
Replies: 1 comment
-
Just out of interest, I created a new python project in both 3.11.9 and 3.12.7 on the vps server and installed openai, which requires Pydantic and Pydantic_core, and I get the same error as the above. These are clean install experiments, so the issue seems not to be existing dependencies. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So I have a local version (windows) and a VPS server running ubunbu 22.04 and Apache2 with both running python 3.12.7 The local machine runs fine and works without issue. Running the same versions of pydantic and pydantic_core and openai on both I get errors on the server side:
openai==1.54.3 pydantic==2.9.2 pydantic_core==2.23.4
[Thu Nov 07 12:28:48.353345 2024] [wsgi:error] [pid 509021] [remote] from .batch import Batch as Batch
[Thu Nov 07 12:28:48.353351 2024] [wsgi:error] [pid 509021] [remote] File "/var/www/python.lazyprojects.co.uk/gpt/venv/lib/python3.12/site-packages/openai/types/batch.py", line 7, in
[Thu Nov 07 12:28:48.353355 2024] [wsgi:error] [pid 509021] [remote] from .._models import BaseModel
[Thu Nov 07 12:28:48.353360 2024] [wsgi:error] [pid 509021] [remote ] File "/var/www/python.lazyprojects.co.uk/gpt/venv/lib/python3.12/site-packages/openai/_models.py", line 24, in
[Thu Nov 07 12:28:48.353364 2024] [wsgi:error] [pid 509021] [remote ] from pydantic.fields import FieldInfo
[Thu Nov 07 12:28:48.353369 2024] [wsgi:error] [pid 509021] [remote] File "/var/www/python.lazyprojects.co.uk/gpt/venv/lib/python3.12/site-packages/pydantic/fields.py", line 17, in
[Thu Nov 07 12:28:48.353373 2024] [wsgi:error] [pid 509021] [remote] from pydantic_core import PydanticUndefined
[Thu Nov 07 12:28:48.353381 2024] [wsgi:error] [pid 509021] [remote ] File "/var/www/python.lazyprojects.co.uk/gpt/venv/lib/python3.12/site-packages/pydantic_core/init.py", line 6, in
[Thu Nov 07 12:28:48.353387 2024] [wsgi:error] [pid 509021] [remote ] from ._pydantic_core import (
[Thu Nov 07 12:28:48.353424 2024] [wsgi:error] [pid 509021] [remote ] ModuleNotFoundError: No module named 'pydantic_core._pydantic_core'
Having googled it, I see lots about Lambda but I am not using any of that. So I am not sure why this is happening. Can anyone help?
Beta Was this translation helpful? Give feedback.
All reactions