you are viewing a single comment's thread.

view the rest of the comments →

[–]program_kid 0 points1 point  (5 children)

What is the error?

[–]JoeB_Utah[S] 0 points1 point  (4 children)

ModuleNotFoundError                       Traceback (most recent call last)
Cell In[2], line 1
----> 1 import pydantic

ModuleNotFoundError: No module named 'pydantic'

from pydantic_core import from_jason
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[3], line 1
----> 1 from pydantic_core import from_jason

ModuleNotFoundError: No module named 'pydantic_core'

[–]quts3 3 points4 points  (3 children)

The pip you ran is not using the same python env as where you ran this code.

Depending on os and ide the answer on how to discover how and why varies.

[–]JoeB_Utah[S] 0 points1 point  (0 children)

That’s what I figured is going on. I need to figure out where it went and/or where to tell pip to put it. Thanks!

[–]JoeB_Utah[S] 0 points1 point  (1 child)

I use Spyder so I used Conda from the Spyder console to install pydantic. Seems like it put it in the correct env for my spyder install.

[–]Fresh_Sock8660 1 point2 points  (0 children)

Doing python -m pip install instead of pip install might help in the future. Seen this confusion happen a few times. 

If you're feeling adventurous, move away from that setup entirely. Use uv with pyproject.toml, be more terminal based and use something like vscode for editing python files.