Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Install on Unix (Debian 7.8)

Zohaib Rauf edited this page Mar 13, 2019 · 4 revisions

This doc assumes installation is made on Debian 7.8

Install Mono

If Mono is not installed, then create installmono.sh in a text editor and run it with bash installmono.sh

# add debian repository
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
# write the echoed line into the file on the right
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
# update packets - this installs mono..
sudo apt-get update -y
# The package mono-complete should be installed to install everything - this should cover most cases of “assembly not found” errors.
apt-get install mono-complete -y
# mono-dbg -  has the .mdb files which mono uses for stack traces in managed code... so that exceptions are logged properly.
apt-get install mono-dbg -y                 
# mono-runtime-db - has the debug info gdb uses for bugs in mono itself
apt-get install mono-runtime-dbg -y
mozroots --import --machine --sync
mono --version
echo "Mono Install finished!"

Install Jupyter

Via Package Manager

This has the advantage that it works on x86_64 and ARM

apt-get install python python-pip
mv jupyter jupytertest    The PIP installer will install to /usr/local/bin/jupyter
apt-get install python-dev
apt-get install libzmq-dev
pip install jupyter

Via Anaconda Package Manager

This seems to be the officially recommended way to install jupyter.

wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda-2.3.0-Linux-x86_64.sh
bash Anaconda-2.3.0-Linux-x86_64.sh
conda update jupyter    (Works for first install, and also for upgrade)

Compile ICSharp

apt-get install git -y
#checkout with submodules:
git clone --recursive https://github.com/zabirauf/icsharp.git
cd icsharp
bash ./build.sh brew

Run C# in Jupyter Notebook

Exchange the ip for your server ip, and change the directory before iCSharp.Kernel.exe

jupyter notebook --KernelManager.kernel_cmd="['mono', '/usr/local/bin/myjupytertest/icsharp/Kernel/bin/Release/iCSharp.Kernel.exe', '{connection_file}']"  --ip=10.1.9.5  --MappingKernelManager.default_kernel_name='icsharp'

Notes:

  • Omitting the parameter default_kernel_name will prevent accessing any variables in the notebook.
  • The Kernel incorrectly appears as Python2.

Adding kernel specification to Jupyter

The Jupyter kernel specifications now live in kernel-spec/kernel.json. You will need to modify kernel-spec/kernel.json to contain the correct <INSTALL PATH>.

Run the following to install the kernel specification and then it should show up in your current Jupyter notebook instance. jupyter-kernelspec install kernel-spec