You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在远程服务器及VM Ubuntu的Jupyter Notebook中启用Julia内核

Hey there! Let's tackle both of your Julia kernel issues one by one—they share a lot of the same core steps, with just a few environment-specific tweaks to keep in mind.

1. Getting Julia Kernel Working in Jupyter Notebook on a Remote Server

Here's a straightforward step-by-step guide:

  • First, make sure both Julia and Jupyter are installed on your remote server. For Julia, grab the appropriate version for your server's OS from the official Julia site and install it. For Jupyter, you can use pip install jupyter (if you have Python/pip set up) or a package manager like Conda if that's your preference.
  • Launch the Julia REPL (just type julia in your remote server's terminal), then run these commands to install the IJulia package—this is the bridge between Julia and Jupyter:
    using Pkg
    Pkg.add("IJulia")
    
  • Next, start Jupyter on the remote server with settings that allow external access. Run this command:
    jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser
    
    The 0.0.0.0 flag lets Jupyter accept connections from any IP, 8888 is the default port (you can change it if needed), and --no-browser skips trying to open a browser on the server (since you'll access it locally).
  • On your local machine, set up an SSH tunnel to forward the remote server's Jupyter port to your local machine:
    ssh -L 8888:localhost:8888 your_username@remote_server_ip
    
  • Finally, open your local browser and go to http://localhost:8888, then enter the token that appeared in your remote server's terminal when you started Jupyter. You should now see the Julia kernel option when creating a new notebook!
  • If the kernel doesn't show up, double-check that IJulia installed correctly by running using IJulia in the Julia REPL (no errors means it's good). If that works, manually register the kernel with:
    IJulia.installkernel("Julia")
    
    Then restart Jupyter and try again.
2. Enabling Julia Kernel in Jupyter Notebook on Ubuntu VM

This is almost identical to the remote server setup, with a few VM-specific notes:

  • First, install Julia and Jupyter on your Ubuntu VM. You can use sudo apt install julia (note: the repo version might be a bit outdated—if you need the latest Julia, download the official tarball, extract it, and add it to your PATH). For Jupyter, use pip3 install jupyter or sudo apt install jupyter-notebook.
  • Launch the Julia REPL in your VM's terminal, then install IJulia the same way as before:
    using Pkg
    Pkg.add("IJulia")
    
    If prompted to install Jupyter during this process, select "no" since you already have it set up.
  • Start Jupyter Notebook with jupyter notebook—if your VM has a GUI, this should automatically open a browser window with Jupyter. If it doesn't, copy the URL (including the token) from the terminal and paste it into your VM's browser.
  • When creating a new notebook, the Julia kernel should be an option in the dropdown menu. If it's missing, run IJulia.installkernel("Julia") in the Julia REPL to manually register it, then restart Jupyter.
  • If you're using a headless VM (no GUI), you can use the same SSH port forwarding trick as the remote server: forward the VM's 8888 port to your local machine, then access Jupyter via your local browser.

内容的提问来源于stack exchange,提问作者NeleSt

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 07:54:07