Skip to content

Conversation

ThatDesert
Copy link
Contributor

- Added a section below conda installation instructions that talks about what to do when installing cf alongside Jupyter (common use case)
@sadielbartholomew sadielbartholomew self-requested a review August 6, 2025 17:26
@sadielbartholomew sadielbartholomew added the documentation Improvements or additions to documentation label Aug 6, 2025
Copy link
Member

@sadielbartholomew sadielbartholomew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, Ollie! Good spot about potential environment issues here.

I have made some suggestions to clarify the edge case and think we should try to check the workaround together tomorrow since I am not convinced it works (I wonder if jupyter would run properly even if the installation commands didn't complain)...

Co-authored-by: Sadie L. Bartholomew <[email protected]>
Copy link
Contributor Author

@ThatDesert ThatDesert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the clarification!

@sadielbartholomew
Copy link
Member

sadielbartholomew commented Aug 8, 2025

Great stuff. Thanks Ollie.

As for the workaround you suggested - it does indeed seem to work (as tested through a new Python 3.12 conda environment)! Logically based on the dependency constraints I don't understand why (although guess that perhaps somehow they relax certain constraints when installation happens in a different order, or something funky), but if it works for both of us independently then we can only assume it should work generally. So, we can ignore my comment here: #884 (comment). Thanks for finding it and apologies for questioning it - as conveyed in person I didn't understand the logic behind it, but really the key is what works in practice 🙂

I am happy to merge this now. Though, since you've made your first contribution to the library, it'd be great f you could add your name to the contributor list at github.com/NCAS-CMS/cf-python/blob/main/docs/source/contributing.rst#contributors, via editing that documentation source RST file to include your name (in your preferred format) in the list according to alphabetical order.

Please let me know if you'd prefer to add your name to the contributor list outside of this PR by comment, else push another commit to do that and once that's up I will merge this PR.

@sadielbartholomew
Copy link
Member

To add: in case useful going forward, the versions of relevant libraries I end up with (using Python 3.12) after following your workaround Ollie are:

$ conda list | grep esmpy                                                                ─╯
esmpy                     8.8.1              pyhecae5ae_0    conda-forge
$ conda list | grep jupyter                                                              ─╯
jupyter                   1.1.1           py312h06a4308_0  
jupyter-lsp               2.2.5           py312h06a4308_0  
jupyter_client            8.6.3           py312h06a4308_0  
jupyter_console           6.6.3           py312h06a4308_1  
jupyter_core              5.8.1           py312h06a4308_0  
jupyter_events            0.12.0          py312h06a4308_0  
jupyter_server            2.16.0          py312h06a4308_0  
jupyter_server_terminals  0.5.3           py312h06a4308_0  
jupyterlab                4.4.4           py312h06a4308_0  
jupyterlab_pygments       0.3.0           py312h06a4308_0  
jupyterlab_server         2.27.3          py312h06a4308_0  
jupyterlab_widgets        3.0.15          py312h06a4308_0  
$ conda list | grep zlib                                                                 ─╯
libzlib                   1.2.13               h4ab18f5_6    conda-forge
zlib                      1.2.13               h4ab18f5_6    conda-forge

@sadielbartholomew
Copy link
Member

Brilliant, thanks. Merging now.

@sadielbartholomew sadielbartholomew merged commit f8c9573 into NCAS-CMS:main Aug 8, 2025
@ThatDesert ThatDesert deleted the docs/conda-jupyter-fix branch August 8, 2025 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants