niosh-mining / obsplus

A Pandas-Centric ObsPy Expansion Pack
GNU Lesser General Public License v3.0
38 stars 8 forks source link

Installing from conda insntalls wrong pydantic version #244

Closed shawnboltz closed 3 years ago

shawnboltz commented 3 years ago

Description When installing obsplus from conda, it is downloading the version of pydantic on conda-forge, which is only 0.18.2 (the current version is 1.8.2). As a result, obsplus is unable to be imported because it cannot find pydantic's root_validator (introduced in version 1).

To Reproduce Install a fresh version of Anaconda, install obsplus with conda install -c conda-forge. From a python shell import obsplus and it returns an ImportError stating that it cannot find root_validator

Expected behavior The correct version of pydantic should get installed with obsplus so that it is possible to import.

Possible Fix Would it work to just pin the version of pydantic to >= the latest version? (I see that they recently patched a security issue and wouldn't recommend going lower than that.)

Versions (please complete the following information):

d-chambers commented 3 years ago

I am a bit confused why this is the case. Conda forge lists pydantic v 1.8.2 here. I think you are right about the versions. We would need to pin the conda-forge version here and obsplus' requirements.txt.

I will make the changes and create a minor version bump to re-trigger the conda builds.

d-chambers commented 3 years ago

I tested installing obsplus 0.2.0 on linux into a new python 3.8 conda env and that worked fine. This is probably a windows-specific issue.

shawnboltz commented 3 years ago

Weird. Yeah, it must be. I repeated it on two computers (images the same), so it wasn’t just a fluke or user error. Thanks.


From: Derrick Chambers @.> Sent: Friday, September 3, 2021 8:11 To: niosh-mining/obsplus @.> Cc: Boltz, M. Shawn (CDC/NIOSH/SMRD/MSB) @.>; Author @.> Subject: Re: [niosh-mining/obsplus] Installing from conda insntalls wrong pydantic version (#244)

I tested installing obsplus 0.2.0 on linux into a new python 3.8 conda env and that worked fine. This is probably a windows-specific issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/niosh-mining/obsplus/issues/244#issuecomment-912610921, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARQXFLXRIC54ENIZFKV52IDUADQRBANCNFSM5DKDU46Q. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

d-chambers commented 3 years ago

Ok it looks like conda has build 0.2.1, want to try again?

d-chambers commented 3 years ago

I just tested installing 0.2.1 on windows 10 with python 3.7 and it worked fine. I will close this for now, feel free to re-open if needed.

sboltz commented 3 years ago

All right. Thanks. I was going to try it tomorrow, but that should have fixed it.

On Sep 6, 2021, at 18:01, Derrick Chambers @.***> wrote:

 I just tested installing 0.2.1 on windows 10 with python 3.7 and it worked fine. I will close this for now, feel free to re-open if needed.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.