-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstallation.html
More file actions
226 lines (214 loc) · 12.9 KB
/
installation.html
File metadata and controls
226 lines (214 loc) · 12.9 KB
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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Installing SPy — Spectral Python 0.21 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Reading HSI Data Files" href="fileio.html" />
<link rel="prev" title="Introduction" href="user_guide_intro.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="py-modindex.html" title="Python Module Index"
>modules</a></li>
<li class="right" >
<a href="fileio.html" title="Reading HSI Data Files"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="user_guide_intro.html" title="Introduction"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">Spectral Python 0.21 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="user_guide.html" accesskey="U">Spectral Python (SPy) User Guide</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="installing-spy">
<span id="installation"></span><h1>Installing SPy<a class="headerlink" href="#installing-spy" title="Permalink to this headline">¶</a></h1>
<div class="toctree-wrapper compound">
</div>
<div class="section" id="spy-dependencies">
<h2>SPy Dependencies<a class="headerlink" href="#spy-dependencies" title="Permalink to this headline">¶</a></h2>
<p>SPy requires Python and depends on several other freely available Python
modules. Prior to installing SPy, you should make sure its dependencies are met.
While you can use SPy to process hyperspectral data with just Python and NumPy,
there are several other modules you will need if you want to use any of SPy’s
graphical capabilities.</p>
<table class="colwidths-given center docutils align-default" id="id1">
<caption><span class="caption-text">SPy Dependencies</span><a class="headerlink" href="#id1" title="Permalink to this table">¶</a></caption>
<colgroup>
<col style="width: 44%" />
<col style="width: 56%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Dependency</p></th>
<th class="head"><p>Notes</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><a class="reference external" href="http://www.python.org">Python</a> 2.6+ or 3.3+</p></td>
<td><p><cite>(1)</cite></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="http://numpy.scipy.org/">NumPy</a></p></td>
<td><p>Required</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://pypi.python.org/pypi/Pillow/">Pillow</a> or <a class="reference external" href="http://www.pythonware.com/products/pil/">Python Imaging Library (PIL)</a></p></td>
<td><p>Required if displaying or saving images</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="http://www.wxpython.org/">wxPython</a></p></td>
<td><p><cite>(2)</cite></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="http://matplotlib.org/">matplotlib</a></p></td>
<td><p>Required if rendering raster displays or spectral plots</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="http://ipython.org/">IPython</a></p></td>
<td><p>Required for interactive, non-blocking GUI windows</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="http://pyopengl.sourceforge.net/">PyOpenGL</a></p></td>
<td><p><cite>(2)</cite></p></td>
</tr>
</tbody>
</table>
<p>Notes:</p>
<p>(1): All SPy functions work with Python 3.3+ except <a class="reference internal" href="class_func_ref.html#spectral.view_cube" title="spectral.view_cube"><code class="xref py py-func docutils literal notranslate"><span class="pre">view_cube</span></code></a> and <a class="reference internal" href="class_func_ref.html#spectral.view_nd" title="spectral.view_nd"><code class="xref py py-func docutils literal notranslate"><span class="pre">view_nd</span></code></a>.</p>
<p>(2): Required if calling <a class="reference internal" href="class_func_ref.html#spectral.view_cube" title="spectral.view_cube"><code class="xref py py-func docutils literal notranslate"><span class="pre">view_cube</span></code></a> or <a class="reference internal" href="class_func_ref.html#spectral.view_nd" title="spectral.view_nd"><code class="xref py py-func docutils literal notranslate"><span class="pre">view_nd</span></code></a>.</p>
<p>As of SPy version 0.10, IPython is used to provide interactive GUI windows.
To use SPy with IPython, you will need to start IPython in “pylab” mode
(see <a class="reference internal" href="graphics.html#starting-ipython"><span class="std std-ref">Starting IPython</span></a>).</p>
</div>
<div class="section" id="installing-from-a-distribution-package">
<h2>Installing from a distribution package<a class="headerlink" href="#installing-from-a-distribution-package" title="Permalink to this headline">¶</a></h2>
<p>SPy is distributed as a Python source distribution, which can be downloaded from
the <a class="reference external" href="https://pypi.python.org/pypi/spectral">Python Package Index (PyPI)</a> or
from the <a class="reference external" href="https://github.com/spectralpython/spectral">SPy Project Page</a> on
GitHub. The source distribution will unpack to a directory with
a name like <code class="docutils literal notranslate"><span class="pre">spectral-x.y</span></code>, where <code class="docutils literal notranslate"><span class="pre">x.y</span></code> is the SPy version number. To
install SPy, open a console in the unpacked directory and type the following:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">setup</span><span class="o">.</span><span class="n">py</span> <span class="n">install</span>
</pre></div>
</div>
<p>Note that if you are on a unix-based system, you will either need to be logged
in as root or preface the above command with “sudo” (unless you use the -d
option to install it to a local directory).</p>
</div>
<div class="section" id="installing-with-pip-or-distribute">
<h2>Installing with pip or Distribute<a class="headerlink" href="#installing-with-pip-or-distribute" title="Permalink to this headline">¶</a></h2>
<p>If you have <a class="reference external" href="http://pypi.python.org/pypi/distribute/">Distribute</a> (or the
deprecated Setuptools) or <a class="reference external" href="http://pypi.python.org/pypi/pip">pip</a> installed on
your system, there is no need to download the latest SPy version explicitly.
If you have Distribute installed, simply type</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">easy_install</span> <span class="n">spectral</span>
</pre></div>
</div>
<p>or using pip, type</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">spectral</span>
</pre></div>
</div>
<p>Note that your pip binary may be named differently (e.g., “pip-python”). And
again, you may need to be logged in as root or use “sudo” if you are on a
unix-based system.</p>
</div>
<div class="section" id="installing-from-the-git-source-code-repository">
<h2>Installing from the Git source code repository<a class="headerlink" href="#installing-from-the-git-source-code-repository" title="Permalink to this headline">¶</a></h2>
<p>The latest version of the SPy source code resides in the GitHub source code
repository. While the latest source code may be less stable than the most
recent release, it often has newer features and bug fixes. To download the
latest version of SPy from the Git repository, <code class="docutils literal notranslate"><span class="pre">cd</span></code> to the directory
where you would like to check out the source code and type the following:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">spectralpython</span><span class="o">/</span><span class="n">spectral</span><span class="o">.</span><span class="n">git</span>
</pre></div>
</div>
</div>
<div class="section" id="configuring-spy">
<h2>Configuring SPy<a class="headerlink" href="#configuring-spy" title="Permalink to this headline">¶</a></h2>
<p>Because hyperspectral data files can be quite large, you might store all your
HSI data in one or several specific directories. To avoid having to type
absolute path names whenever you attempt to open an HSI file in SPy, you can
define a <code class="docutils literal notranslate"><span class="pre">SPECTRAL_DATA</span></code> environment variable, which SPy will use to find
image files (if they are not found in the current directory). <code class="docutils literal notranslate"><span class="pre">SPECTRAL_DATA</span></code>
should be a colon-delimited list of directory paths.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><code class="xref py py-class docutils literal notranslate"><span class="pre">SpySettings</span></code></p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Installing SPy</a><ul>
<li><a class="reference internal" href="#spy-dependencies">SPy Dependencies</a></li>
<li><a class="reference internal" href="#installing-from-a-distribution-package">Installing from a distribution package</a></li>
<li><a class="reference internal" href="#installing-with-pip-or-distribute">Installing with pip or Distribute</a></li>
<li><a class="reference internal" href="#installing-from-the-git-source-code-repository">Installing from the Git source code repository</a></li>
<li><a class="reference internal" href="#configuring-spy">Configuring SPy</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="user_guide_intro.html"
title="previous chapter">Introduction</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="fileio.html"
title="next chapter">Reading HSI Data Files</a></p>
<div 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" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</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="py-modindex.html" title="Python Module Index"
>modules</a></li>
<li class="right" >
<a href="fileio.html" title="Reading HSI Data Files"
>next</a> |</li>
<li class="right" >
<a href="user_guide_intro.html" title="Introduction"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">Spectral Python 0.21 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="user_guide.html" >Spectral Python (SPy) User Guide</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2014, Thomas Boggs.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
</div>
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-47389515-2', 'spectralpython.net');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
</body>
</html>