Google Colab is a Google-hosted Jupyter notebook service that allows a user to access their notebooks from anywhere by storing them in Google Drive. It requires no setup beyond creating a Google account, and provides free computing resources, including cloud-based GPUs. To learn more, refer to the FAQ or tutorial. Colab is a very convenient platform for ArcGIS administration and management, as it allows a user to run scripts from wherever they have access to a Google account.
Google Colab runs in a cloud virtual machine that uses Ubuntu, meaning that it can process bash commands in addition to Python logic. Any command with a !
in front of it will be treated as if it were entered on the command line. This means that the ArcGIS API for Python can be installed with pip
.
Follow the steps below to install:
!pip install arcgis
.If your account has already been working on a notebook (even a separate one), it may prompt you to restart your runtime in order for this to work. This well reset your environment variables without altering any of your code, allowing you to re-run these commands and install successfully.
!pip list
. The list should include arcgis along with all of the proper dependencies found in a normal arcgis install.import arcgis
to confirm that it works properly.Currently, Google Colab is not readily compatible with the ArcGIS mapping widget, but may work with some functions that return iFrames, such as the WebExperience.preview()
method. To enable these widgets (or any 3rd-party widget) in Colab, run from google.colab import output
followed by output.enable_custom_widget_manager()
.
At the time of writing this, this installation process works for the default version of Python that comes with Colab, 3.10.12. This means that only ArcGIS 2.2.0 and higher can be installed, as prior versions are not compatible with Python 3.10+. Downgrading the Python version in Colab is possible, but may interfere with other dependencies needed to run ArcGIS.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4