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

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

问题描述

我正在使用Julia v0.3进行一些项目.但是,我想同时在v0.3和v0.4中测试我的代码(因为某些将要使用它的人已经在使用v0.4).我正在运行Ubuntu 14.04,并已使用apt-get安装了Julia.我知道PPA的两周都可以使用v0.4,但是如果添加此功能,则将替换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天全站免登陆