forked from IRkernel/irkernel.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
115 lines (108 loc) · 5.21 KB
/
index.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
---
layout: default
title: Installation
class: installation
---
<section class=offcenter>
<a href={{site.baseurl}}/running>
<button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect">
Continue to Running
</button>
</a>
<div class="mdl-tabs mdl-js-tabs-fixed mdl-js-ripple-effect">
<div class="mdl-tabs__tab-bar">
<a href="#binary-panel" class="mdl-tabs__tab is-active">Binary</a>
<a href="#source-panel" class=mdl-tabs__tab>Source</a>
<a href="#devel-panel" class=mdl-tabs__tab>Development</a>
</div>
<div class="mdl-tabs__panel is-active" id=binary-panel>
<h3>1/2) Installing via supplied binary packages<br>(default on Windows + Mac OS X)</h3>
<p>You can install all packages using the following lines in an R console:</p>
<pre class="r mdl-shadow--2dp"><code>install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest'))
devtools::install_github('IRkernel/IRkernel')
# Don’t forget step 2/2!</code></pre>
<p>To update the IRkernel package, which is not yet on CRAN, you have to rerun the <code>devtools::</code> line. For the other packages, a simple <code>update.packages()</code> is sufficient.</p>
</div>
<div class=mdl-tabs__panel id=source-panel>
<h3>1/2) Installing from source<br>(default on Linux)</h2>
<h4>ZMQ</h3>
<p>You'll need zmq development headers to compile pbdZMQ (Click your OS):</p>
<div class="mdl-tabs mdl-js-tabs-fixed mdl-js-ripple-effect mdl-shadow--2dp">
<div class="mdl-tabs__tab-bar">
<a href="#linux-panel" class=mdl-tabs__tab>Linux</a>
<a href="#os-x-panel" class=mdl-tabs__tab>OS X</a>
<a href="#windows-panel" class=mdl-tabs__tab>Windows</a>
</div>
<div class="card-panel mdl-tabs__panel" id=linux-panel>
<h5>Ubuntu and Debian</h5>
<pre class="bash"><code>sudo apt-get install libzmq3-dev</code></pre>
<h5>Fedora</h5>
<pre class="bash"><code>sudo yum install czmq-devel</code></pre>
<h5>Arch Linux</h5>
<pre class="bash"><code>sudo pacman -S zeromq</code></pre>
</div>
<div class="card-panel mdl-tabs__panel" id=os-x-panel>
<h5>Homebrew</h5>
<pre class="bash"><code>xcode-select --install
brew install zmq
# or upgrade
brew update
brew upgrade zmq</code></pre>
<h5>MacPorts</h5>
<ol>
<li>make sure an <a href="http://xquartz.macosforge.org/">X server is installed</a>, open a terminal and do the following:
<pre class="bash"><code>xcode-select --install
sudo port install zmq</code></pre></li>
<li>Direct the compiler to use MacPorts libraries using:
<pre class="bash"><code>export CPATH=/opt/local/include
export LIBRARY_PATH=/opt/local/lib</code></pre></li>
</ol>
</div>
<div class="card-panel mdl-tabs__panel" id=windows-panel>
<p>See <a href="https://github.com/IRkernel/IRkernel/issues/54#issuecomment-84467798">this bugreport</a> for instruction on how to compile on windows.
</div>
</div>
<h4>R packages</h3>
<p>Start <code>R</code> in the same terminal, and proceed as below.</p>
<p>You can install snapshot packages and the kernel spec via</p>
<pre class="r mdl-shadow--2dp"><code>install.packages(c('crayon', 'pbdZMQ', 'devtools'))
devtools::install_github(paste0('IRkernel/', c('repr', 'IRdisplay', 'IRkernel')))</code></pre>
<p>To update your source installation, repeat above step.</p>
</div>
<div class=mdl-tabs__panel id=devel-panel>
<h3>1/2) Development Version<br>(Only recommended to test a bugfix which is not yet in a stable version)</h3>
<p>If you want to compile the latest and greatest (and maybe buggiest…) from git, the easiest way is via the <code>devtools</code> package.</p>
<p>On Ubuntu/Debian, a header package is needed to compile RCurl:</p>
<pre class="bash mdl-shadow--2dp"><code>sudo apt-get install libcurl4-openssl-dev</code></pre>
<p>Start a R session and run:</p>
<pre class="r mdl-shadow--2dp"><code>install.packages('devtools')
# Need RCurl for install_github
install.packages('RCurl')
library(devtools)
# Install the packages
install_github('IRkernel/repr')
install_github('IRkernel/IRdisplay')
install_github('IRkernel/IRkernel')</code></pre>
<p>To update the git versions, repeat the <code class=r>install_github('IRkernel/...')</code> steps.</p>
</div>
</div>
<h3>2/2) Making the kernel available to Jupyter</h3>
<aside class="card-note mdl-card mdl-shadow--2dp">
<div class="mdl-card__title">
<i class="material-icons">warning</i>
<div class="mdl-layout-spacer"></div>
Important!
<div class="mdl-layout-spacer"></div>
<i class="material-icons">warning</i>
</div>
<div class="mdl-card__supporting-text">
On OS X, be sure to execute this in R started from the Terminal, not the R App!<br>
(This is because the R app doesn’t honor <var>$PATH</var> changes in <samp>~/.bash_profile</samp>)
</div>
</aside>
<p>If you haven’t done this already, you will have to make Jupyter see the newly installed R kernel by installing a kernel spec.
<p>The kernel spec can be installed for the current user with the following line from R:
<pre class="r mdl-shadow--2dp"><code>IRkernel::installspec()</code></pre>
<p>To install system-wide, set <code>user</code> to False in the <code>installspec</code> command:</p>
<pre class="r mdl-shadow--2dp"><code>IRkernel::installspec(user = FALSE)</code></pre>
</section>