# cannot import name 'Schema' from 'pydantic'

**URL:** https://support.prodi.gy/t/cannot-import-name-schema-from-pydantic/4638
**Category:** Getting Started
**Tags:** third-party, install
**Created:** [August 31, 2021, 12:59pm UTC](https://support.prodi.gy/t/cannot-import-name-schema-from-pydantic/4638 "2021-08-31T12:59:21Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mnezhad](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@mnezhad](https://support.prodi.gy/u/mnezhad)
#### Post date: [August 31, 2021, 12:59pm UTC](https://support.prodi.gy/t/cannot-import-name-schema-from-pydantic/4638/1 "2021-08-31T12:59:21Z")

</div>

Hi,  
Im going to load my custom prodigy web-app using docker. However, I got this error:

 ![Screenshot 2021-08-31 at 14.55.12](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/2X/a/a54c2454425afb8f046e622d79ac0e727013ab90.png)  
the version of installed pydantic, spacy and prodigy are as follow:

pydantic==1.7  
spacy==2.3.7  
prodigy==1.10.8

I already ran recipe in docker but this time the issue is not solved. Could you please help me?

---

<div class="post-metadata">

### Author: ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)
#### Post date: [August 31, 2021, 1:06pm UTC](https://support.prodi.gy/t/cannot-import-name-schema-from-pydantic/4638/2 "2021-08-31T13:06:53Z")

</div>

Hi! Are you sure the `prodigy` in your conda environment is the correct version? Because this import was explicitly removed in Prodigy v1.10.7 so if you're running the versions you reported, you shouldn't be seeing this error. So maybe your `python` / `prodigy` refers to a different environment than the one you expect?

Also see this thread for background and a similar environment problem:

> [@ImportError: cannot import name 'Schema' from 'pydantic'](https://support.prodi.gy/t/importerror-cannot-import-name-schema-from-pydantic/3948/2):
>
> Thanks for the heads-up! I guess we'll have to push another update then to prevent the new Pydantic from breaking Prodigy. (This is a frustrating part of pinning dependencies in Python: we used to have it pinned for narrowly to the next minor version, but this can cause users to get version-locked. But if we pin to a library loosely, it can mean that a breaking update can break our stuff.) Edit: Fixed in Prodigy v1.10.7!

---

<div class="post-metadata">

### Author: ![mnezhad](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@mnezhad](https://support.prodi.gy/u/mnezhad)
#### Post date: [August 31, 2021, 1:25pm UTC](https://support.prodi.gy/t/cannot-import-name-schema-from-pydantic/4638/3 "2021-08-31T13:25:15Z")

</div>

Yes I'm sure. because the only version that I downloaded and installed is 1.10.8. You can also see following screen shot from base conda env:

 ![Screenshot 2021-08-31 at 15.22.05](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/2X/a/a3bf66e271171322e16acd586a5bb235334165ea.png)

I really get stuck in this issue.

---

<div class="post-metadata">

### Author: ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)
#### Post date: [August 31, 2021, 3:18pm UTC](https://support.prodi.gy/t/cannot-import-name-schema-from-pydantic/4638/4 "2021-08-31T15:18:02Z")

</div>

That's definitely strange because that line of code really shouldn't be there in that version. (Btw, did you double-check that `which python` and `which ipython` point to the same Python used by the environment, i.e. `/opt/conda`?)

Alternatively, you can always downgrade `pydantic`, but the expected version here is `pydantic==1.7`. Again, it seems like this is not the version used in that conda environment because `pydantic` v1.7 should have that import available.
