-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcanopy_install.html
112 lines (87 loc) · 5.51 KB
/
canopy_install.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Installing Enthought Canopy</title>
<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="stylesheet" href="stylesheets/pygment_trac.css">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="wrapper">
<h1>Installing Enthought Canopy Python</h1>
<img src="figures/canopy.png" style="float: right; width: 30%; margin-right: 1%; margin-bottom: 0.5em;">
Enthought Canopy is a Python distribution that bundles the Python programming
language and over 300 Python packages for scientific computing, some of which
provide spatial analysis and/or GIS functionality.<p>
<ol>
<li>Request an academic account on the <a href="https://store.enthought.com/licenses/academic/" target="_blank" >Enthought website</a>.</li>
<li>Once you have an academic account, login to the Enthought website and <a href="https://store.enthought.com/downloads" target="_blank" >download the 64-bit version</a> of Canopy.</li>
<li>Installing Enthought Canopy</li>
<ul>
<li>Install the downloaded file as you would any piece of software. Use all the defaults unless you're comfortable changing things.</li>
<li>The software is now "installed", but is not really usable yet.</li>
<li>Launch the Canopy application to begin the setup process. On a Mac you may need to go to the Applications folder and right-click the Canopy app and select <tt>Open</tt> (this is only required the first time).</li>
<li>I recommend using all the defaults, including making Canopy your default Python. Note that this version of Python does not conflict with the Python installed by ESRI.</li>
<li>Log in to your Enthought account in the Canopy application. <a href="images/enthought8.png" >example</a></li>
<li>Click the <tt>Package Manager</tt> button. <a href="images/enthought9.png" >example</a></li>
<li>Click <tt>Updates</tt> in the left pane. <a href="images/enthought10.png" >example</a>
<li>Click the <tt>Install all Updates</tt> button in the lower-right. <a href="images/enthought11.png" >example</a></li>
</ul>
</ol>
<h3>(RECOMMENDED) Install a Good Text Editor</h3>
A good text editor will make coding easier and more fun.
<ul>
<li>Mac: <a href="http://www.barebones.com/products/textwrangler/">TextWrangler</a></li>
<li>Windows: <a href="https://notepad-plus-plus.org/">Notepad++</a></li>
</ul>
<h3>(OPTIONAL) Using ArcGIS with Canopy Python</h3>
<img src="figures/arcpy_icon.png" style="float: right; width: 30%; margin-right: 1%; margin-bottom: 0.5em;">
When you install ArcGIS, you also get a version of Python, a limited set
of open source packages and ESRI's packages (e.g., <tt>arcpy</tt>). What
you have done so far will not impact ArcGIS or the Python that comes with
ArcGIS (at least as far as I've tested). The following steps allow you to
access ArcGIS's python packages AND Canopy's large set of open source
packages in the same Python environment. <BR><BR>
<u>32-bit vs. 64-bit</u>: Your versions of Canopy and ArcGIS
must match. If the setup below doesn't work it is probably due to
mismatched architecture. In general, 64-bit is preferred to 32-bit since it
can hold much more data in memory, but the python scripts inside your
version of ArcGIS may not be 64-bit. <br><br>
<ol>
<li>Figure out the path to the ArcGIS installation on your machine. It's probably on <tt>C:\</tt> or some directory of programs on <tt>C:\</tt>. We will call this <tt>C:\path\to\ArcGIS\</tt>.
<li>Figure out the path to the Enthought installation on your
machine. It's probably in your user space on <tt>C:\</tt>.
We will call this
<tt>C:\Users\your_name\AppData\Local\Enthought\</tt>. If you do not
see the <tt>AppData</tt> directory on your machine, then it is
probably hidden;
<a href="http://blogs.msdn.com/b/zxue/archive/2012/03/08/win8-howto-19-show-hidden-files-folders-and-drives.aspx"
>follow this link to unhide it</a>.
<li>Open a text editor (e.g., Notepad or <a
href="http://notepad-plus-plus.org/" >Notepad++</a>), and enter the
following lines (you will replace <tt>\path\to\</tt> with the path on
your machine):</li>
<tt># .pth file for arcpy <br>
C:\path\to\ArcGIS\Desktop10.1\bin <br>
C:\path\to\ArcGIS\Desktop10.1\arcpy <br>
C:\path\to\ArcGIS\Desktop10.1\ArcToolbox\Scripts </tt> <br>
<li>Save the content of the text editor as <tt>zzArcGIS.pth</tt>.</li>
<li>Move <tt>zzArcGIS.pth</tt> to
<tt>C:\Users\your_name\AppData\Local\Enthought\Canopy32\User\lib\site-packages</tt>.
</ol>
You should now be able to import <tt>arcpy</tt> into you Canopy Python
environment. If you want more details on this process or want to import
Canopy packages when you're in ArcGIS Python, <a
href="http://gis.stackexchange.com/questions/59012/how-to-access-esri-arcpy-modules-from-enthought-canopy" >click here</a>.
<p>
<p>
<p><small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
</div>
<script src="javascripts/scale.fix.js"></script>
</body>
</html>