-
Notifications
You must be signed in to change notification settings - Fork 104
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
Build support for Google Colab #103
Comments
@darribas was casually looking into this and the Google Colab launch buttons are working as intended. The problem seems to be that an automatically generated Google Colab for a given notebook will usually require the installation of For example, trying to run Choropleth Mapping on a fresh Google Colab runtime will require the installation of Is there any way to pass arguments to the automatically generated Google Colab such that certain modules will already be installed? A similar question was raised in bookdown here. Perhaps another solution would be to add the following caveat paragraph to each .ipynb:
|
Thanks for this Jeff. Yes, I think Collab opens fine from the buttons but on a "blank" stack with no geo libs installed. I suspect that'd create a bunch of confusion as you expect it to "just work" as it does with Binder for example. I haven't spent enough time on Collab to get a good solution up and running but would very much welcome solutions. Ideally, there'd be a way to pull a In my experience (although I haven't tried in a while), |
Totally! Sounds good! A If you need a 'crude' solution, I tested a few versions of the following lines on a 'blank' Google Colab runtime...
...the above successfully installs pysal, geopandas, and their dependencies without needing to restart the runtime, but it is very sensitive to the ordering of the modules. Will ping you if I find anything! |
@darribas might have some progress. Adapted from this SO post. Was able to get the following lines to install a fresh conda environment in a new Google Colab runtime.
As noted above, the |
Dropping here this project which might make our life easier: https://github.com/conda-incubator/condacolab It seems that all would be required be: !pip install -q condacolab
import condacolab
condacolab.install() |
This seems important (URL): #################################################################################
# INSTALL MAMBA ON GOOGLE COLAB
#################################################################################
! wget -O miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-py37_4.10.3-Linux-x86_64.sh
! chmod +x miniconda.sh
! bash ./miniconda.sh -b -f -p /usr/local
! rm miniconda.sh
! conda config --add channels conda-forge
! conda install -y mamba
! mamba update -qy --all
! mamba clean -qafy
import sys
sys.path.append('/usr/local/lib/python3.7/site-packages/') |
It'd be good to have the book run on Google Colab.
The text was updated successfully, but these errors were encountered: