3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Lambda Layers で No module named 'pydantic_core._pydantic_core'

Posted at

問題

anthropic を含んだ Lambda Layers を用意したが、以下のエラーが発生して困った。

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

解決方法(anthropic)

fastapi==0.99.0を先にインストールすると回避できるようです。

-pip install -t ./python anthropic
+pip install -t ./python fastapi==0.99.0 anthropic

解決方法(openai)

openaiも同様です。

-pip install -t ./python openai
+pip install -t ./python fastapi==0.99.0 openai
3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?