Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSharp for Jupyter Notebook #4

Open
lotapp opened this issue Jun 19, 2018 · 3 comments
Open

CSharp for Jupyter Notebook #4

lotapp opened this issue Jun 19, 2018 · 3 comments
Assignees

Comments

@lotapp
Copy link

lotapp commented Jun 19, 2018

之前说有机会就说下Linux下如何搭建C#版的交互编程,今天写篇文章还债^_^

Win下比较简单,可以自己看官方文档https://github.com/zabirauf/icsharp/wiki/Installation下面逆天带搭建搭建下Linux下的环境(官方方法有问题)

CSharp交互式编程

1.安装mono部分组件

先看看官方仓库

安装mono部分组件,写段shell脚本,然后bash installmono.sh 直接执行

代码如下:

# add Ubuntu 18.04 repository
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
# 更新一下
sudo apt-get update -y
# 安装 mono-complete
sudo apt-get install mono-complete -y
# 安装 mono-dbg
sudo apt-get install mono-dbg -y                 
# 安装 mono-runtime-dbg
sudo apt-get install mono-runtime-dbg -y
# 导入证书
mozroots --import --machine --sync
# 查看mono版本
mono --version

看到这个就代表安装完成了

2.安装Jupyter-notebook

这部之前说过了,你安装了conda之后什么都有了,可以参考之前我写的一篇文章:

Anaconda For Linux

3.环境配置

下载release包:
https://github.com/gyurisc/icsharp.kernel/releases/download/v1.0-beta/icsharp_kernel_v1.0.zip

然后移动到/opt/目录下(装软件一般都放这)
现在你可以运行icsharp了:mono icsharp.exe

4.编写代码

新建一个C#的ipynb文件

输入代码,shift+回车运行

其他的自己摸索摸索吧,先这样了~

@gyurisc
Copy link
Owner

gyurisc commented Jun 19, 2018

Hi @lotapp

Thanks for opening the issue. I would like to help you and solve your problem. Unfortunately, I am unable to read your text. Can you please give me a short description of the problem in English?

Thanks,
Krisztian

@lotapp
Copy link
Author

lotapp commented Nov 3, 2018

Hi @gyurisc

Support netcore?Don't want to use mono

Similar to dotnet-script,but dotnet-script like don't run the notebook
https://github.com/filipw/dotnet-script

@gyurisc
Copy link
Owner

gyurisc commented Nov 4, 2018

.NET Core is not yet supported but I will start work on it. I will be updating this issue when it is ready

@gyurisc gyurisc self-assigned this Nov 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants