48

One of the main features of Anaconda is that it is language agnostic as stated in their blog:

You can create environments of any binary dependency tree (different versions of Python, R, Julia, etc.).

Recently I switched from using virtualenv to Anaconda in Python, so I was curious to try Julia in an Anaconda environment. However, I couldn't find instructions explicit enough to install Julia successfully. First, I tried naively conda create -n julia-test julia. Obviously, it didn't work. Then I found at binstar.org a Julia package (version 0.3) with the code

conda install -c https://conda.binstar.org/wakari1 julia

However, I don't want to install Julia outside of a specific virtual environment, so I changed it to:

conda create -n julia-test -c https://conda.binstar.org/wakari1 julia

It didn't throw errors but ultimately failed to start the Julia interpreter.

So, what is the correct way of installing Julia (0.2, preferably) in an anaconda environment?

UPDATE

As of March 2018, Julia v0.6.1 is available for linux-64 on the conda-forge channel:

https://anaconda.org/conda-forge/julia

It has been set up to install packages inside <env_prefix>/share/julia/site, to maintain isolation from the user's ~/.julia user's home directory.

conda create -n julia -c conda-forge julia

quantif
  • 166
  • 3
  • 12
r_31415
  • 8,752
  • 17
  • 74
  • 121
  • 1
    I don't understand why you'd need to/want to install Julia in this? – IainDunning Aug 19 '14 at 01:32
  • 6
    Because I don't want to install and test Julia packages without some kind of virtual environment. Pretty much the same idea of using virtualenv in Python. – r_31415 Aug 19 '14 at 02:03
  • 3
    Julia can be installed in any location, and packages are by default installed in ~/.julia but you can change that just by setting the environmental variable JULIA_PKGDIR. Don't know anything about anaconda though sorry. – IainDunning Aug 19 '14 at 04:41
  • 1
    No problem. I know you can choose the installation directory, but that doesn't prevent issues with multiple packages installed and conflicts with different versions. – r_31415 Aug 19 '14 at 04:55
  • @RobertSmith, Julia is too new, we do not worry about package conflicts *yet*. We're currently *developing* the packages. – juliohm Aug 19 '14 at 12:01
  • 1
    @juliohm But then the statement in the continuum analytics blog is false? – r_31415 Aug 19 '14 at 14:40
  • I'm not following the Anaconda development closely, sorry. – juliohm Aug 20 '14 at 15:51

4 Answers4

34

As of August 2017, Julia v0.5.2 is available on the conda-forge channel:

https://anaconda.org/conda-forge/julia

It has been set up to install packages inside <env_prefix>/share/julia/site, to maintain isolation from the user's ~/.julia user's home directory.

conda create -n julia -c conda-forge julia

dfornika
  • 441
  • 1
  • 4
  • 4
16

The blog post was indicating that conda is general enough to allow packages of any type. There are no packages for Julia yet (except for the one you found in the Wakari channel, which is specific to Wakari).

Building a conda package for Julia and probably isn't difficult. Building a streamlined way to convert Julia packages into conda packages is a bit more work.

asmeurer
  • 86,894
  • 26
  • 169
  • 240
  • 1
    Thank you for your answer. Do you know if this feature is in the works? – r_31415 Aug 19 '14 at 19:12
  • 5
    For people interested, Aaron answered my question here: https://groups.google.com/a/continuum.io/d/msg/anaconda/Td46J2kmehI/IU0XKewbEw0J Basically, the Anaconda team welcomes pull requests. – r_31415 Aug 23 '14 at 18:14
9

Julia 0.4.5 (not the current latest 0.5.0) is now available from the bioconda channel. Using anaconda (python 3.6 version) and following instructions in bioconda :

# In this order    
conda config --add channels conda-forge
conda config --add channels defaults
conda config --add channels r
conda config --add channels bioconda

conda install julia

So to create the corresponding virtual environment:

conda create -n julia-env julia

Nonetheless, I did not see any additional julia libraries available yet.

khourhin
  • 580
  • 5
  • 8
5

As of Jan 2022, Anaconda suggests using;

conda install -c conda-forge julia

See: https://anaconda.org/conda-forge/julia

mccurcio
  • 1,294
  • 5
  • 25
  • 44