Giter Site home page Giter Site logo

homebrew-julia's Introduction

homebrew-julia

A small tap for the Homebrew project to install Julia. Installation instructions:

$ brew update
$ brew tap staticfloat/julia
$ brew install julia

Common Issues

If you are building Julia from source and you see errors about libgfortran.dylib, you most likely need to reinstall the latest gcc, openblas-julia, suite-sparse-julia and arpack-julia:

$ brew update
$ brew rm gcc openblas-julia suite-sparse-julia arpack-julia
$ brew install gcc openblas-julia suite-sparse-julia arpack-julia 

See this thread for technical details as to why gfortran dependencies require this treatment.

Building a bleeding-edge version of Julia

If you wish to test the newest development version of Julia, you can build with the --HEAD option:

$ brew install --HEAD julia

Note that to run the test suite you must also pass the --HEAD option to brew:

$ brew test -v --HEAD julia

Using OpenBLAS HEAD or specifying CPU targets

If you wish to test the newest development version of OpenBLAS with Julia, you can do so by manually unlinking OpenBLAS, and installing the HEAD version of the formula:

$ brew unlink openblas-julia
$ brew install openblas-julia --HEAD

This will install the latest develop branch of OpenBLAS. Julia will happily link against this new version, but unfortunately SuiteSparse will not, so we must recompile SuiteSparse and therefore Julia:

$ brew rm suite-sparse-julia julia
$ brew install julia

When installing OpenBLAS on that shiny new piece of hardware that just came out, note that OpenBLAS may not have the software available to autodetect your processor type. You can manually specify a CPU target architecture by specifying --target when building OpenBLAS. For instance, to specify the Sandybridge archiceture (a good fallback for most modern macs):

$ brew install openblas-julia --target=SANDYBRIDGE

Providing your own userimg.jl

When building Julia, the file base/userimg.jl, if it exists, will be included in the cached of compiled code. If there are large libraries that you use often, it can be useful to require those in this file, for example:

require("Gtk")
require("DataFrames")
require("JuMP")

By default, the userimg.jl file does not exist, but you can provide it yourself, using the --userimg option (using reinstall rather than install if Julia is already installed):

$ brew install julia --userimg=$HOME/julia/myuserimg.jl

The file will then be copied and renamed before the main build, potentially leading to significant speedups when loading the specified modules.

Upgrading Julia

To upgrade Julia, remove and reinstall (Typically you will be doing this when living on the latest development version, so we have included all --HEAD commands here):

$ brew rm julia
$ brew install --HEAD julia

Run tests after upgrading to make sure everything is functioning as expected. Even when Julia is able to build, the tests might still fail due to dependencies.

$ brew test -v --HEAD julia

If compilation of Julia fails, or the tests fail, you may have to remove these dependencies and recompile:

$ brew rm julia arpack-julia suite-sparse-julia openblas-julia
$ brew install -v --HEAD julia && brew test -v --HEAD julia

This procedure is necessary after upgrading gcc, as the location of the gfortran libraries changes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.