在Jupyter笔记本中运行Julia的特定版本

发布于 2025-02-05 12:02:30 字数 1291 浏览 1 评论 0原文

我最近安装了Julia版本0.7.0(我需要此较旧版本)。在此之前,我已经安装了Julia 1.6.2,并且可以在Jupyter Notebook中使用它。现在,通过版本0.7.0的Julia命令行,我安装了Ijulia,在通过同一命令行启动Jupyter笔记本电脑后,我无法在版本0.7.0中打开笔记本电脑。我只看到1.6.2的选项。

如何使用Julia的版本0.7.0启动笔记本?

更新

现在,我可以在打开Jupyter笔记本时看到Julia 0.7.0作为选项,但是现在,当我想将其用于此特定特定时,内核不连接版本。它适用于版本1.6.2

我尝试以两种不同的方式打开笔记本:

  1. 从Anaconda命令行:笔记本电脑启动,但内核不连接。以下错误不断重复:
ERROR: LoadError: MethodError: no method matching setindex!(::Ptr{Nothing}, ::Ptr{Nothing})
Stacktrace:
 [1] start_heartbeat(::ZMQ.Socket) at C:\Users\josh\.julia\packages\IJulia\AQu2H\src\heartbeat.jl:20
 [2] init(::Array{String,1}) at C:\Users\josh\.julia\packages\IJulia\AQu2H\src\init.jl:100
 [3] top-level scope at none:0
 [4] include at .\boot.jl:317 [inlined]
 [5] include_relative(::Module, ::String) at .\loading.jl:1038
 [6] include(::Module, ::String) at .\sysimg.jl:29
 [7] exec_options(::Base.JLOptions) at .\client.jl:239
 [8] _start() at .\client.jl:432
in expression starting at C:\Users\josh\.julia\packages\IJulia\AQu2H\src\kernel.jl:24
  1. 摘自朱莉娅命令行:我收到一条消息,该消息在末尾退出(1)在没有打开任何笔记本的情况下退出了

I recently installed Julia version 0.7.0 (I need this older version). Prior to that, I had installed Julia 1.6.2, and I can use it in Jupyter notebook. Now, through Julia command line in version 0.7.0, I installed IJulia, and after launching the jupyter notebook through the same command line, I am not able to open notebooks in version 0.7.0. I only see options for 1.6.2.

How can I launch a notebook with version 0.7.0 of Julia?

UPDATE

Now I am able to see Julia 0.7.0 as an option when I open Jupyter notebook, but now the kernel does not connect when I want to use it for this specific version. It works fine for version 1.6.2.

I have tried opening a notebook in two different ways:

  1. From anaconda command line: The notebook launches, but the kernel does not connect. The following error keeps repeating:
ERROR: LoadError: MethodError: no method matching setindex!(::Ptr{Nothing}, ::Ptr{Nothing})
Stacktrace:
 [1] start_heartbeat(::ZMQ.Socket) at C:\Users\josh\.julia\packages\IJulia\AQu2H\src\heartbeat.jl:20
 [2] init(::Array{String,1}) at C:\Users\josh\.julia\packages\IJulia\AQu2H\src\init.jl:100
 [3] top-level scope at none:0
 [4] include at .\boot.jl:317 [inlined]
 [5] include_relative(::Module, ::String) at .\loading.jl:1038
 [6] include(::Module, ::String) at .\sysimg.jl:29
 [7] exec_options(::Base.JLOptions) at .\client.jl:239
 [8] _start() at .\client.jl:432
in expression starting at C:\Users\josh\.julia\packages\IJulia\AQu2H\src\kernel.jl:24
  1. From Julia command line: I get a message that says Process Exited(1) at the end without opening any notebook.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我乃一代侩神 2025-02-12 12:02:31

尝试

julia> using Pkg; Pkg.build("IJulia")

在0.7替换中。这应该安装Julia 0.7的Jupyter内核,并将其作为选项。

如果由于某种原因不起作用,您也可以尝试明确调用installkernel函数:

julia> installkernel("Julia 0.7")

Try

julia> using Pkg; Pkg.build("IJulia")

within the 0.7 REPL. This should install the Jupyter kernel for Julia 0.7 and make it available as an option.

In case that doesn't work for some reason, you can also try explicitly calling the installkernel function:

julia> installkernel("Julia 0.7")
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文