Skip to content

No module named 'pydantic_core._pydantic_core' using AWS Lambdas #6557

@quirozs

Description

@quirozs

Initial Checks

  • I confirm that I'm using Pydantic V2 installed directly from the main branch, or equivalent

Description

I have pydantic 2.0.2 installed into my AWS Lambda with python3.10 and whenever I try to import pydantic I get the following exception:

[ERROR] Runtime.ImportModuleError: Unable to import module 'app': No module named 'pydantic_core._pydantic_core'
Traceback (most recent call last):

I already checked that the module exists and it is accessible from python path. It was working with pydantic v1.

Example Code

No response

Python, Pydantic & OS Version

I can't import pydantic but the directory shows:

pydantic-2.0.2.dist-info
pydantic_core-2.1.2.dist-info

Selected Assignee: @davidhewitt

Metadata

Metadata

Assignees

Labels

bug V2Bug related to Pydantic V2pendingIs unconfirmed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions