oceanhackweek / jupyter-image

jupyter-image
MIT License
2 stars 7 forks source link

Updated packages in Python environment #63

Closed emiliom closed 1 year ago

emiliom commented 1 year ago

Added a few packages (contextily, folium, rioxarray, pip, and the pip package echopy), including two language packs (spanish & portuguese). Updated pangeo-notebook to 2023.02.11.

Tried to update conda-lock but ran into problem with pip dependencies.

See https://github.com/oceanhackweek/jupyter-image/issues/42#issuecomment-1427276476, https://github.com/oceanhackweek/Hub-Management/issues/2 and https://github.com/oceanhackweek/Hub-Management/issues/3

abkfenris commented 1 year ago

Lets just go a cross post this: https://github.com/oceanhackweek/jupyter-image/issues/42#issuecomment-1428193354

@emiliom It looks like echopy is a simple enough package to quickly get on Conda-Forge that grayskull probably can auto scaffold the recipe for staged-recipies, so that might be the best route currently, as I don't think conda can directly ingest the non-rendered lockfiles.

@ocefpaf only mamba and micromamba can use the intermediate lockfiles right?

I don't think I'm going to be able convert to a mamba/micromamba based image before this event, and if there are any issues the cross-language debugging might be messy so it's probably better not to try.

emiliom commented 1 year ago

How about if I remove echopy from this PR? That way it can move forward with the other updates, and come back with echopy later, when there might also be other package additions/updates.

emiliom commented 1 year ago

@abkfenris and @ocefpaf The current Python image includes xlrd. IMHO it is useful to have Excel read capability. But xlrd is no longer maintained and doesn't read .xlsx files. Do you have any concerns about replacing it with openpyxl?

abkfenris commented 1 year ago

I don't have an issue swapping it out, especially since Pandas supports using it.

emiliom commented 1 year ago

Thanks.

I forgot that openpyxl doesn't support reading .xls files, but xlrd does. I'm inclined to still drop xlrd altogether, given that it's getting old (though it doesn't seem to have any dependencies). So, I'll do that.

ocefpaf commented 1 year ago

Do you have any concerns about replacing it with openpyxl? I don't use xlrd anymore and we rarelly have non xlsx files. So I'm ok dropping it.

PS: I would also drop the conda-lock.yml file here b/c we only create the Linux lock anyway. You can do it with conda-lock-f environment.yml -p linux-64

emiliom commented 1 year ago

I've removed conda-lock.yml and updated the PR.

Regarding conda-lock-f environment.yml -p linux-64, I get an error "conda-lock-f: command not found". Maybe you meant conda-lock -f environment.yml -p linux-64? That's the statement I've used, per @abkfenris 's instructions in #42, followed by conda-lock render -p linux-64

emiliom commented 1 year ago

Alright, I've re-created the conda environment (again with mamba) now with the new conda-forge echopy package, and updated the conda-lock file. This is now ready to go, hopefully!

emiliom commented 1 year ago

Thanks!