如何在不同版本的 Julia 之间切换(特别是在 Ubuntu 上的 v0.3 和 v0.4 之间)? [英] How do I switch between different versions of Julia (specifically between v0.3 and v0.4 on Ubuntu)?

查看:33
本文介绍了如何在不同版本的 Julia 之间切换(特别是在 Ubuntu 上的 v0.3 和 v0.4 之间)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Julia v0.3 进行一些项目.但是,我想在 v0.3 和 v0.4 中测试我的代码(因为一些将要使用它的人已经在使用 v0.4).我正在运行 Ubuntu 14.04 并使用 apt-get 安装了 Julia.我知道 v0.4 可通过 PPA julianightlies 获得,但如果我添加它,v0.3 将被替换.有没有一种方法可以安装并在两个版本之间快速切换以进行测试?

I am working on some projects using Julia v0.3. However, I'd like to test my code in both v0.3 and v0.4 (since some of the people that are going to be using it are already using v0.4). I'm running Ubuntu 14.04 and have installed Julia using apt-get. I know v0.4 is available through the PPA julianightlies, but if I add this, v0.3 is replaced. Is there a way I can install and quickly switch between both versions for testing purposes?

推荐答案

您可以在不同的位置安装不同版本的 Julia,并设置单独的符号链接.

You can install different versions of Julia in different locations and set separate symlinks.

例如,您可以下载 v0.3 Linux 二进制文件并将它们安装到一个位置,然后克隆 v0.4 的 GitHub 源并将其安装在另一个位置.然后为 v0.3 设置符号链接,例如 julia3 和为 v0.4 设置 julia4.

For example, you could download the v0.3 Linux binaries and install them to one location, then clone the GitHub source for v0.4 and install that in another location. Then set symlinks such as julia3 for v0.3 and julia4 for v0.4.

像这样运行你的代码:

$ julia3 somefile.jl
$ julia4 somefile.jl

这篇关于如何在不同版本的 Julia 之间切换(特别是在 Ubuntu 上的 v0.3 和 v0.4 之间)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆