-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall_linux.html
243 lines (230 loc) · 15.6 KB
/
install_linux.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<!DOCTYPE html>
<html lang="en" data-content_root="./">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>Linux Installation — SpacePy v0.7.0 Manual</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=b76e3c8a" />
<link rel="stylesheet" type="text/css" href="_static/sphinxdoc.css?v=92e3d466" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=fd3f3429" />
<link rel="stylesheet" type="text/css" href="_static/plot_directive.css" />
<script src="_static/documentation_options.js?v=fe7df9b0"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script type="text/javascript" src="_static/copybutton.js"></script>
<link rel="icon" href="_static/spacepy_favicon.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="MacOS Installation" href="install_mac.html" />
<link rel="prev" title="SpacePy Dependencies" href="dependencies.html" />
</head><body>
<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
<a href="index.html"><img src="_static/spacepy_logo.jpg" border="0" alt="spacepy_logo"/></a>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="install_mac.html" title="MacOS Installation"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="dependencies.html" title="SpacePy Dependencies"
accesskey="P">previous</a> |</li>
<li><a href="https://spacepy.github.io/"">homepage</a>| </li>
<li><a href="https://github.com/spacepy/spacepy">development</a>| </li>
<li><a href="search.html">search</a>| </li>
<li><a href="index.html">documentation </a> »</li>
<li class="nav-item nav-item-1"><a href="install.html" accesskey="U">Installing SpacePy</a> »</li>
<li class="nav-item nav-item-this"><a href="">Linux Installation</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="linux-installation">
<h1>Linux Installation<a class="headerlink" href="#linux-installation" title="Link to this heading">¶</a></h1>
<p>If using your system’s built-in Python SpacePy we recommend installing
dependencies <a class="reference internal" href="#linux-dep-apt"><span class="std std-ref">via the package manager</span></a>. Our
recommended (but not required) standalone Python distribution is
<a class="reference external" href="https://docs.anaconda.com/anaconda/">Anaconda</a> running 64-bit
Python 3. Anaconda includes much of the scientific Python stack.</p>
<p>SpacePy ships 64-bit binaries for most modern Linux
distributions. They are built with the <a class="reference external" href="https://github.com/pypa/manylinux/">manylinux2014_x86_64</a> Docker images and should work
on any x86_64 Linux using glibc2.17 or later, e.g. Ubuntu 16.04 and
CentOS 7.</p>
<p>Building from source on Linux requires both a C and a Fortran
compiler; a recent GCC is recommended (the C compiler is likely
included with your distribution). On Debian and Ubuntu:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">gfortran</span>
</pre></div>
</div>
<p>Once this is set up, <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">spacepy</span></code> should Just Work. If
you’re installing as a single user (not in a virtual environment) then
add the <code class="docutils literal notranslate"><span class="pre">--user</span></code> flag.</p>
<p>You will also need the <a class="reference internal" href="#linux-cdf"><span class="std std-ref">NASA CDF library</span></a> to use
<a class="reference internal" href="autosummary/spacepy.pycdf.html#module-spacepy.pycdf" title="spacepy.pycdf"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pycdf</span></code></a>.</p>
<p>If you prefer to install the dependencies some way other than pip, see
<a class="reference internal" href="#linux-dep-conda"><span class="std std-ref">Dependencies via conda</span></a> and <a class="reference internal" href="#linux-dep-apt"><span class="std std-ref">Dependencies via system packages</span></a>.</p>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#dependencies-via-conda" id="id1">Dependencies via conda</a></p></li>
<li><p><a class="reference internal" href="#dependencies-via-system-packages" id="id2">Dependencies via system packages</a></p></li>
<li><p><a class="reference internal" href="#cdf" id="id3">CDF</a></p></li>
<li><p><a class="reference internal" href="#raspberry-pi" id="id4">Raspberry Pi</a></p></li>
</ul>
</nav>
<section id="dependencies-via-conda">
<span id="linux-dep-conda"></span><h2><a class="toc-backref" href="#id1" role="doc-backlink">Dependencies via conda</a><a class="headerlink" href="#dependencies-via-conda" title="Link to this heading">¶</a></h2>
<p>Installation via <code class="docutils literal notranslate"><span class="pre">pip</span></code> will automatically install most Python
dependencies (but not the <a class="reference internal" href="#linux-cdf"><span class="std std-ref">NASA CDF library</span></a>). They
can also be installed from conda:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">install</span> <span class="n">numpy</span> <span class="n">python</span><span class="o">-</span><span class="n">dateutil</span> <span class="n">scipy</span> <span class="n">matplotlib</span> <span class="n">h5py</span>
</pre></div>
</div>
</section>
<section id="dependencies-via-system-packages">
<span id="linux-dep-apt"></span><h2><a class="toc-backref" href="#id2" role="doc-backlink">Dependencies via system packages</a><a class="headerlink" href="#dependencies-via-system-packages" title="Link to this heading">¶</a></h2>
<p>SpacePy usually works with the system Python on Linux. To install dependencies via the package manager on Debian or Ubuntu:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">python3</span><span class="o">-</span><span class="n">dev</span> <span class="n">python3</span><span class="o">-</span><span class="n">h5py</span> <span class="n">python3</span><span class="o">-</span><span class="n">matplotlib</span> <span class="n">python3</span><span class="o">-</span><span class="n">numpy</span> <span class="n">python3</span><span class="o">-</span><span class="n">dateutil</span> <span class="n">python3</span><span class="o">-</span><span class="n">scipy</span>
</pre></div>
</div>
<p>For other distributions, check <a class="reference internal" href="dependencies.html"><span class="doc">SpacePy Dependencies</span></a> and install by hand
or via your package manager.</p>
<p>To get the dependencies for building documentation:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">python3</span><span class="o">-</span><span class="n">sphinx</span> <span class="n">python3</span><span class="o">-</span><span class="n">numpydoc</span>
</pre></div>
</div>
</section>
<section id="cdf">
<span id="linux-cdf"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">CDF</a><a class="headerlink" href="#cdf" title="Link to this heading">¶</a></h2>
<p>The NASA CDF library is included if installing from a binary wheel. If
you build SpacePy from source or wish to use a different version of the
CDF library, you will need to install it.</p>
<p>It is recommended to install the ncurses library; on Ubuntu and Debian:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">ncurses</span><span class="o">-</span><span class="n">dev</span>
</pre></div>
</div>
<p>Download the latest <a class="reference external" href="http://cdf.gsfc.nasa.gov/">CDF library</a>. Choose
the file ending in <code class="docutils literal notranslate"><span class="pre">-dist-all.tar.gz</span></code> from the <code class="docutils literal notranslate"><span class="pre">linux</span></code>
directory. Untar and cd into the resulting directory. Then build:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">OS</span><span class="o">=</span><span class="n">linux</span> <span class="n">ENV</span><span class="o">=</span><span class="n">gnu</span> <span class="n">CURSES</span><span class="o">=</span><span class="n">yes</span> <span class="n">FORTRAN</span><span class="o">=</span><span class="n">no</span> <span class="n">UCOPTIONS</span><span class="o">=-</span><span class="n">O2</span> <span class="n">SHARED</span><span class="o">=</span><span class="n">yes</span> <span class="nb">all</span>
</pre></div>
</div>
<p>Use <code class="docutils literal notranslate"><span class="pre">CURSES=no</span></code> if the curses library is not installed. (The
distribution-specific directions above will install curses.)</p>
<p>Install:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">make</span> <span class="n">install</span>
</pre></div>
</div>
<p>This will install the library into the default location <code class="docutils literal notranslate"><span class="pre">/usr/local/cdf</span></code>, where
SpacePy can find it. If you choose to install elsewhere, see the CDF documentation,
particularly the notes on the <code class="docutils literal notranslate"><span class="pre">CDF_BASE</span></code> and <code class="docutils literal notranslate"><span class="pre">CDF_LIB</span></code> environment variables.
SpacePy uses these variables to find the library.</p>
</section>
<section id="raspberry-pi">
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Raspberry Pi</a><a class="headerlink" href="#raspberry-pi" title="Link to this heading">¶</a></h2>
<p>SpacePy works on Raspberry Pi, using Raspberry Pi OS in 32-bit or
64-bit flavors. A few tips:</p>
<blockquote>
<div><ul>
<li><p>Binary wheels are provided for 64-bit only.</p></li>
<li><p>It is highly recommended to install all dependencies (numpy,
etc.) via the system package manager <code class="docutils literal notranslate"><span class="pre">apt-get</span></code> rather than
pip, as prebuilt wheels are not generally available and compiling
dependencies on the Pi can take a very long time:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">gfortran</span> <span class="n">python3</span><span class="o">-</span><span class="n">numpy</span> <span class="n">python3</span><span class="o">-</span><span class="n">dateutil</span> <span class="n">python3</span><span class="o">-</span><span class="n">scipy</span> <span class="n">python3</span><span class="o">-</span><span class="n">h5py</span> <span class="n">python3</span><span class="o">-</span><span class="n">matplotlib</span>
</pre></div>
</div>
</li>
</ul>
</div></blockquote>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="index.html">
<img class="logo" src="_static/logo.png" alt="Logo"/>
</a></p>
<div>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Linux Installation</a><ul>
<li><a class="reference internal" href="#dependencies-via-conda">Dependencies via conda</a></li>
<li><a class="reference internal" href="#dependencies-via-system-packages">Dependencies via system packages</a></li>
<li><a class="reference internal" href="#cdf">CDF</a></li>
<li><a class="reference internal" href="#raspberry-pi">Raspberry Pi</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="dependencies.html"
title="previous chapter">SpacePy Dependencies</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="install_mac.html"
title="next chapter">MacOS Installation</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/install_linux.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="install_mac.html" title="MacOS Installation"
>next</a> |</li>
<li class="right" >
<a href="dependencies.html" title="SpacePy Dependencies"
>previous</a> |</li>
<li><a href="https://spacepy.github.io/"">homepage</a>| </li>
<li><a href="https://github.com/spacepy/spacepy">development</a>| </li>
<li><a href="search.html">search</a>| </li>
<li><a href="index.html">documentation </a> »</li>
<li class="nav-item nav-item-1"><a href="install.html" >Installing SpacePy</a> »</li>
<li class="nav-item nav-item-this"><a href="">Linux Installation</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2011-2024, The SpacePy Team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.3.7.
</div>
</body>
</html>