cybergis / cybergis-compute-python-sdk

https://cybergis.github.io/cybergis-compute-python-sdk
Apache License 2.0
5 stars 7 forks source link

JupyterLab widgets fail to render if user tries to install compute explicitly #47

Closed mitkotak closed 2 years ago

mitkotak commented 2 years ago

Problem

The UI breaks If the user tries to install cybergis-compute-python-sdk on top of the version that's already provided.

import sys
!{sys.executable} -m pip install --ignore-installed git+https://github.com/cybergis/cybergis-compute-python-sdk.git
Screen Shot 2022-09-01 at 10 22 47 AM Screen Shot 2022-09-01 at 10 20 07 AM

This is happening due to dependency conflicts as seen in the output for the pip command

Screen Shot 2022-09-01 at 10 20 56 AM

Proposed Solution

Ask users to restart their container and avoid installing the cybergis-compute-python-sdk explicitly.

alexandermichels commented 2 years ago

It's hard to tell exactly what causes this problem. It could be:

I recommend using the following to install from now on so as to not install new versions of the dependencies:

pip install --force-reinstall --no-deps git+https://github.com/cybergis/cybergis-compute-python-sdk.git

As you noted, for users on CyberGISX, we recommend restarting your container by going to "File" -> "Hub Control Panel" -> "Stop My Server". Once it stops, restart it. This works because we have configured pip to install packages into non-persistent storage by default.

Also note that the Python 0.9.0 kernel has our SDK installed by default, so this pip install is only necessary if you need a particular version of the code.

Thank you for documenting this problem. Since we have a couple of solutions that work to resolve the problem (restart container and use the flags mentioned above), I'm going to close it for now.