PageSourceSearch

https://deckgl.readthedocs.io/en/latest/installation.html

html deckgl.readthedocs.io collected 2026-10-09 05:18:41 UTC 13,032 bytes, 224 lines download raw bytes

1<!DOCTYPE html>
2<html class="writer-html5" lang="en" data-content_root="./">
3<head>
4  <meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
5
6  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7  <title>Installing pydeck &mdash; pydeck 0.9.3 documentation</title>
8      <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=b86133f3" />
9      <link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
10
11  
12    <link rel="shortcut icon" href="_static/favicon.png"/>
13  <!--[if lt IE 9]>
14    
14<script src="_static/js/html5shiv.min.js"></script>
14
15  <![endif]-->
16  
17        
17<script src="_static/jquery.js?v=5d32c60e"></script>
17
18        
18<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
18
19        
19<script src="_static/documentation_options.js?v=0e439607"></script>
19
20        
20<script src="_static/doctools.js?v=9a2dae69"></script>
20
21        
21<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
21
22    
22<script src="_static/js/theme.js"></script>
22
23    <link rel="index" title="Index" href="genindex.html" />
24    <link rel="search" title="Search" href="search.html" />
25    <link rel="next" title="Contributing to pydeck" href="contributing.html" />
26    <link rel="prev" title="Widgets" href="gallery/widgets.html" /> 
27<script async type="text/javascript" src="/_/static/javascript/readthedocs-addons.js"></script>
27<meta name="readthedocs-project-slug" content="deckgl" /><meta name="readthedocs-version-slug" content="latest" /><meta name="readthedocs-resolver-filename" content="/installation.html" /><meta name="readthedocs-http-status" content="200" /></head>
28
29<body class="wy-body-for-nav"> 
30  <div class="wy-grid-for-nav">
31    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
32      <div class="wy-side-scroll">
33        <div class="wy-side-nav-search" >
34
35          
36          
37          <a href="index.html" class="icon icon-home">
38            pydeck
39          </a>
40              <div class="version">
41                0.9
42              </div>
43<div role="search">
44  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
45    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
46    <input type="hidden" name="check_keywords" value="yes" />
47    <input type="hidden" name="area" value="default" />
48  </form>
49</div>
50        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
51              <p class="caption" role="heading"><span class="caption-text">Getting started</span></p>
52<ul class="current">
53<li class="toctree-l1 current"><a class="current reference internal" href="#">Installing pydeck</a><ul>
54<li class="toctree-l2"><a class="reference internal" href="#via-pip">Via pip</a></li>
55<li class="toctree-l2"><a class="reference internal" href="#via-conda">Via conda</a></li>
56<li class="toctree-l2"><a class="reference internal" href="#getting-a-mapbox-api-key">Getting a Mapbox API key</a></li>
57<li class="toctree-l2"><a class="reference internal" href="#enabling-pydeck-for-jupyter">Enabling pydeck for Jupyter</a></li>
58<li class="toctree-l2"><a class="reference internal" href="#installing-from-source">Installing from source</a></li>
59<li class="toctree-l2"><a class="reference internal" href="#development">Development</a></li>
60</ul>
61</li>
62<li class="toctree-l1"><a class="reference internal" href="contributing.html">Contributing to pydeck</a></li>
63</ul>
64<p class="caption" role="heading"><span class="caption-text">API documentation</span></p>
65<ul>
66<li class="toctree-l1"><a class="reference internal" href="layer.html">Layer Overview and Examples</a></li>
67<li class="toctree-l1"><a class="reference internal" href="deck.html">Deck</a></li>
68<li class="toctree-l1"><a class="reference internal" href="data_utils.html">Data utilities</a></li>
69<li class="toctree-l1"><a class="reference internal" href="view_state.html">ViewState</a></li>
70<li class="toctree-l1"><a class="reference internal" href="view.html">View</a></li>
71<li class="toctree-l1"><a class="reference internal" href="light_settings.html">LightSettings</a></li>
72<li class="toctree-l1"><a class="reference internal" href="widget.html">Widget</a></li>
73<li class="toctree-l1"><a class="reference internal" href="types.html">Types</a></li>
74</ul>
75<p class="caption" role="heading"><span class="caption-text">Jupyter</span></p>
76<ul>
77<li class="toctree-l1"><a class="reference internal" href="jupyter.html">Jupyter-specific features</a></li>
78<li class="toctree-l1"><a class="reference internal" href="event_handling.html">Event handling</a></li>
79<li class="toctree-l1"><a class="reference internal" href="binary_transfer.html">Binary data transfer</a></li>
80</ul>
81<p class="caption" role="heading"><span class="caption-text">Further customization</span></p>
82<ul>
83<li class="toctree-l1"><a class="reference internal" href="tooltip.html">Configuring tooltips</a></li>
84<li class="toctree-l1"><a class="reference internal" href="custom_layers.html">Custom layers</a></li>
85</ul>
86<p class="caption" role="heading"><span class="caption-text">Development</span></p>
87<ul>
88<li class="toctree-l1"><a class="reference internal" href="CHANGELOG.html">CHANGELOG</a></li>
89</ul>
90
91        </div>
92      </div>
93    </nav>
94
95    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
96          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
97          <a href="index.html">pydeck</a>
98      </nav>
99
100      <div class="wy-nav-content">
101        <div class="rst-content">
102          <div role="navigation" aria-label="Page navigation">
103  <ul class="wy-breadcrumbs">
104      <li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
105      <li class="breadcrumb-item active">Installing pydeck</li>
106      <li class="wy-breadcrumbs-aside">
107            <a href="_sources/installation.rst.txt" rel="nofollow"> View page source</a>
108      </li>
109  </ul>
110  <hr/>
111</div>
112          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
113           <div itemprop="articleBody">
114             
115  <section id="installing-pydeck">
116<h1>Installing pydeck<a class="headerlink" href="#installing-pydeck" title="Link to this heading"></a></h1>
117<p>There are two steps before using pydeck:</p>
118<blockquote>
119<div><ol class="arabic simple">
120<li><p>Install the library via pip or conda</p></li>
121<li><p>Include an API key from Google Maps or Mapbox (Optional)</p></li>
122</ol>
123</div></blockquote>
124<p>pydeck requires Python 3.8 or above.</p>
125<section id="via-pip">
126<h2>Via pip<a class="headerlink" href="#via-pip" title="Link to this heading"></a></h2>
127<p>Note: It is best practice to run this command in a <a class="reference external" href="https://docs.python.org/3/library/venv.html#creating-virtual-environments">virtual environment</a>.</p>
128<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span>pydeck
129</pre></div>
130</div>
131</section>
132<section id="via-conda">
133<h2>Via conda<a class="headerlink" href="#via-conda" title="Link to this heading"></a></h2>
134<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>conda<span class="w"> </span>install<span class="w"> </span>-c<span class="w"> </span>conda-forge<span class="w"> </span>pydeck
135</pre></div>
136</div>
137<p>That’s it — pydeck renders visualizations using the deck.gl JavaScript library loaded from a
138CDN, so no additional Jupyter extension setup is needed for <code class="docutils literal notranslate"><span class="pre">.show()</span></code> and <code class="docutils literal notranslate"><span class="pre">.to_html()</span></code>.</p>
139</section>
140<section id="getting-a-mapbox-api-key">
141<h2>Getting a Mapbox API key<a class="headerlink" href="#getting-a-mapbox-api-key" title="Link to this heading"></a></h2>
142<p>By default, pydeck v0.6 onwards provides basemap tiles through Carto.</p>
143<p>You can optionally use a Mapbox API key, by
144registering for Mapbox via <a class="reference external" href="https://account.mapbox.com/auth/signup/">this link</a>.
145You should then create a <a class="reference external" href="https://account.mapbox.com/access-tokens/">new public API token</a>.
146You can learn more about Mapbox tokens via their <a class="reference external" href="https://docs.mapbox.com/help/how-mapbox-works/access-tokens/#how-access-tokens-work">documentation</a>.</p>
147<p>You can also use a Google Maps API key in a similar way. Currently Google Maps is not supported for 3D visualizations.</p>
148<p>pydeck checks for API keys via environment variables automatically. Both the deck.gl JavaScript convention
149and the pydeck convention are supported (the deck.gl convention is checked first):</p>
150<ul class="simple">
151<li><p><strong>Mapbox</strong>: <code class="docutils literal notranslate"><span class="pre">MapboxAccessToken</span></code> (deck.gl) or <code class="docutils literal notranslate"><span class="pre">MAPBOX_API_KEY</span></code> (pydeck)</p></li>
152<li><p><strong>Google Maps</strong>: <code class="docutils literal notranslate"><span class="pre">GoogleMapsAPIKey</span></code> (deck.gl) or <code class="docutils literal notranslate"><span class="pre">GOOGLE_MAPS_API_KEY</span></code> (pydeck)</p></li>
153<li><p><strong>Carto</strong>: <code class="docutils literal notranslate"><span class="pre">CARTO_API_KEY</span></code></p></li>
154</ul>
155<p>For example, to set your Mapbox key:</p>
156<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span><span class="w"> </span><span class="nv">MapboxAccessToken</span><span class="o">=</span>pk.your_token_here
157</pre></div>
158</div>
159<p>If you’re already working with deck.gl JavaScript projects, you likely have <code class="docutils literal notranslate"><span class="pre">MapboxAccessToken</span></code> set
160and pydeck will pick it up automatically.</p>
161</section>
162<section id="enabling-pydeck-for-jupyter">
163<h2>Enabling pydeck for Jupyter<a class="headerlink" href="#enabling-pydeck-for-jupyter" title="Link to this heading"></a></h2>
164<div class="admonition note">
165<p class="admonition-title">Note</p>
166<p>The Jupyter widget integration (binary transport, data selection, event handlers, and
167live <code class="docutils literal notranslate"><span class="pre">.update()</span></code>) is not currently functional in pydeck v0.9+. See <a class="reference internal" href="jupyter.html"><span class="doc">Jupyter-specific features</span></a> for
168details. The extension setup instructions below are retained for when widget support is
169restored.</p>
170</div>
171<p>pydeck also works in Google Colab. While you can install pydeck in Google Colab via pip, it is not yet enabled for server use.</p>
172</section>
173<section id="installing-from-source">
174<h2>Installing from source<a class="headerlink" href="#installing-from-source" title="Link to this heading"></a></h2>
175<p>If you want to install the library from its source:</p>
176<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>git<span class="w"> </span>clone<span class="w"> </span>https://github.com/visgl/deck.gl
177<span class="nb">cd</span><span class="w"> </span>deck.gl/bindings/pydeck
178make<span class="w"> </span>setup-env
179<span class="nb">source</span><span class="w"> </span>.venv/bin/activate
180make<span class="w"> </span>init
181</pre></div>
182</div>
183</section>
184<section id="development">
185<h2>Development<a class="headerlink" href="#development" title="Link to this heading"></a></h2>
186<p>If you want to install pydeck for development, see <a class="reference internal" href="contributing.html"><span class="doc">Contributing to pydeck</span></a>.</p>
187<p>You can run the local tests to verify that the installation worked via <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code>.</p>
188</section>
189</section>
190
191
192           </div>
193          </div>
194          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
195        <a href="gallery/widgets.html" class="btn btn-neutral float-left" title="Widgets" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
196        <a href="contributing.html" class="btn btn-neutral float-right" title="Contributing to pydeck" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
197    </div>
198
199  <hr/>
200
201  <div role="contentinfo">
202    <p>&#169; Copyright Vis.gl Contributors.</p>
203  </div>
204
205  Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
206    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
207    provided by <a href="https://readthedocs.org">Read the Docs</a>.
208   
209
210</footer>
211        </div>
212      </div>
213    </section>
214  </div>
215  
215<script>
216      jQuery(function () {
217          SphinxRtdTheme.Navigation.enable(true);
218      });
219  </script>
219  
220
221
222
223</body>
224</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.