Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possible issue with new conda package #529

Open
pavlis opened this issue Apr 19, 2024 · 3 comments
Open

possible issue with new conda package #529

pavlis opened this issue Apr 19, 2024 · 3 comments

Comments

@pavlis
Copy link
Collaborator

pavlis commented Apr 19, 2024

I think we may have a minor issue with the new conda package. I don't think it include pymongo and it probably should. The reason is that our Database class and others references bson and pymongo frequently. I got import errors trying to use it with a script using Database anyway. I had an old version of pymongo installed that I thought was causing a problem, but I did

pip uninstall pymongo

and then used conda to install pymongo in the same environment I had installed the mpsass package. It ran fine, BUT still get this error when try to use an instance of Database running it locally:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[2], line 1
----> 1 from bson.codec_options import CodecOptions, TypeRegistry, DatetimeConversion

ImportError: cannot import name 'DatetimeConversion' from 'bson.codec_options' (/home/pavlis/anaconda3/envs/mspass_py310/lib/python3.10/site-packages/bson/codec_options.py)

We need to fix this asap if we are going to use the package for upcoming workshops.

@pavlis
Copy link
Collaborator Author

pavlis commented May 3, 2024

I thought about making this a separate issues page, but the problem is closely related to the topic here. The conda package also lacks a package obspy uses to make some graphics called Cartopy. That package is used by the "plot" methods of Catalog and Inventory and maybe other things in obspy. Easy to see how it would be missed as is a secondary package for obspy for specialized map plots.

@wangyinz
Copy link
Member

wangyinz commented May 3, 2024

Since this is a dependency of ObsPy, it is probably their decision to not include the package as a normal dependency. I wonder we need to add it if we are not directly depending on it. I am actually fine either way, but @Aristoeu you may want to make the decision as you are working on this item.

@Aristoeu
Copy link
Collaborator

I added Cartopy package in #515
I tried installing mspasspy in a new environment, it seems have included Pymongo, codec, and DatetimeConversion as I can import them successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants