Julia is a high-level, high-performance dynamic language for technical computing. The main homepage for Julia can be found at julialang.org. This is the GitHub repository of Julia source code, including instructions for compiling and installing Julia, below.
- Homepage: https://julialang.org
- Binaries: https://julialang.org/downloads/
- Documentation: https://docs.julialang.org/
- Packages: https://pkg.julialang.org/
- Source code: https://github.com/JuliaLang/julia
- Git clone URL: git:https://github.com/JuliaLang/julia.git
- Discussion forum: https://discourse.julialang.org
- Mailing lists: https://julialang.org/community/
- Slack: https://julialang.slack.com (get an invite from https://slackinvite.julialang.org)
- Gitter: https://gitter.im/JuliaLang/julia
- IRC: https://webchat.freenode.net/?channels=julia
- Code coverage: https://coveralls.io/r/JuliaLang/julia
New developers may find the notes in CONTRIBUTING helpful to start contributing to the Julia codebase.
Julia is built and tested regularly on the following platforms:
Operating System | Architecture | CI | Binaries | Support Level |
---|---|---|---|---|
Linux 2.6.18+ | x86-64 (64-bit) | ✓ | ✓ | Official |
i686 (32-bit) | ✓ | ✓ | Official | |
ARM v7 (32-bit) | ✓ | Official | ||
ARM v8 (64-bit) | Community | |||
PowerPC (64-bit) | Community | |||
PTX (64-bit) | ✓ | External | ||
macOS 10.8+ | x86-64 (64-bit) | ✓ | ✓ | Official |
Windows 7+ | x86-64 (64-bit) | ✓ | ✓ | Official |
i686 (32-bit) | ✓ | ✓ | Official | |
FreeBSD 11.0+ | x86-64 (64-bit) | ✓ | ✓ | Official |
All systems marked with ✓ for CI are tested using continuous integration for every commit. Systems with ✓ for binaries have official binaries available on the downloads page and are tested regularly. The PTX backend needs the CUDAnative.jl package. The systems listed here with neither CI nor official binaries are known to build and work, but ongoing support for those platforms is dependent on community efforts. It is possible that Julia will build and work on other platforms too, and we're always looking to improve our platform coverage. If you're using Julia on a platform not listed here, let us know!
First, make sure you have all the required dependencies installed. Then, acquire the source code by cloning the git repository:
git clone git:https://github.com/JuliaLang/julia.git
(If you are behind a firewall, you may need to use the https
protocol instead of the git
protocol:
git config --global url."https://".insteadOf git:https://
Be sure to also configure your system to use the appropriate proxy settings, e.g. by setting the https_proxy
and http_proxy
variables.)
By default you will be building the latest unstable version of Julia. However, most users should use the most recent stable version of Julia, which is currently the 1.0
series of releases. You can get this version by changing to the Julia directory and running
git checkout v1.0.2
Now run make
to build the julia
executable. To perform a parallel build, use make -j N
and supply the maximum number of concurrent processes. (See Platform Specific Build Notes for details.)
When compiled the first time, it will automatically download and build its external dependencies.
This takes a while, but only has to be done once. If the defaults in the build do not work for you, and you need to set specific make parameters, you can save them in Make.user
, and place the file in the root of your Julia source. The build will automatically check for the existence of Make.user
and use it if it exists.
Building Julia requires 5GiB of disk space and approximately 2GiB of virtual memory.
You can create out-of-tree builds of Julia by specifying make O=<build-directory> configure
on the command line. This will create a directory mirror, with all of the necessary Makefiles to build Julia, in the specified directory. These builds will share the source files in Julia and deps/srccache
. Each out-of-tree build directory can have its own Make.user
file to override the global Make.user
file in the top-level folder.
If you need to build Julia on a machine without internet access, use make -C deps getall
to download all the necessary files. Then, copy the julia
directory over to the target environment and build with make
.
Note: The build process will fail badly if any of the build directory's parent directories have spaces or other shell meta-characters such as $
or :
in their names (this is due to a limitation in GNU make).
Once it is built, you can run the julia
executable after you enter your julia directory and run
./julia
To run julia from anywhere you can:
-
add an alias (in
bash
:echo "alias julia='/path/to/install/folder/bin/julia'" >> ~/.bashrc && source ~/.bashrc
), or -
add a soft link to the
julia
executable in thejulia
directory to/usr/local/bin
(or any suitable directory already in your path), or -
add the
julia
directory to your executable path for this shell session (inbash
:export PATH="$(pwd):$PATH"
; incsh
ortcsh
:set path= ( $path $cwd )
), or -
add the
julia
directory to your executable path permanently (e.g. in.bash_profile
), or -
write
prefix=/path/to/install/folder
intoMake.user
and then runmake install
. If there is a version of Julia already installed in this folder, you should delete it before runningmake install
.
Now you should be able to run Julia like this:
julia
If everything works correctly, you will see a Julia banner and an interactive prompt into which you can enter expressions for evaluation. (Errors related to libraries might be caused by old, incompatible libraries sitting around in your PATH. In this case, try moving the julia
directory earlier in the PATH). Note that most of the instructions above apply to unix systems.
Your first test of Julia determines whether your build is working properly. From the UNIX/Windows command prompt inside
the julia
source directory, type make testall
. You should see output that lists a series of running tests;
if they complete without error, you should be in good shape to start using Julia.
You can read about getting started in the manual.
If you are building a Julia package for distribution on Linux, OS X, or Windows, take a look at the detailed notes in DISTRIBUTING.md.
If you have previously downloaded julia
using git clone
, you can update the
existing source tree using git pull
rather than starting anew:
cd julia
git pull && make
Assuming that you had made no changes to the source tree that will conflict with upstream updates, these commands will trigger a build to update to the latest version.
-
Over time, the base library may accumulate enough changes such that the bootstrapping process in building the system image will fail. If this happens, the build may fail with an error like
*** This error is usually fixed by running 'make clean'. If the error persists, try 'make cleanall' ***
As described, running
make clean && make
is usually sufficient. Occasionally, the stronger cleanup done bymake cleanall
is needed. -
New versions of external dependencies may be introduced which may occasionally cause conflicts with existing builds of older versions.
a. Special
make
targets exist to help wipe the existing build of a dependency. For example,make -C deps clean-llvm
will clean out the existing build ofllvm
so thatllvm
will be rebuilt from the downloaded source distribution the next timemake
is called.make -C deps distclean-llvm
is a stronger wipe which will also delete the downloaded source distribution, ensuring that a fresh copy of the source distribution will be downloaded and that any new patches will be applied the next timemake
is called.b. To delete existing binaries of
julia
and all its dependencies, delete the./usr
directory in the source tree. -
If you've updated OS X recently, be sure to run
xcode-select --install
to update the command line tools. Otherwise, you could run into errors for missing headers and libraries, such asld: library not found for -lcrt1.10.6.o
. -
If you've moved the source directory, you might get errors such as
CMake Error: The current CMakeCache.txt directory ... is different than the directory ... where CMakeCache.txt was created.
, in which case you may delete the offending dependency underdeps
-
In extreme cases, you may wish to reset the source tree to a pristine state. The following git commands may be helpful:
git reset --hard #Forcibly remove any changes to any files under version control git clean -x -f -d #Forcibly remove any file or directory not under version control
To avoid losing work, make sure you know what these commands do before you run them.
git
will not be able to undo these changes!
Julia does not install anything outside the directory it was cloned into. Julia can be completely uninstalled by deleting this directory. Julia packages are installed in ~/.julia
by default, and can be uninstalled by deleting ~/.julia
.
- GCC version 4.7 or later is required to build Julia.
- To use external shared libraries not in the system library search path, set
USE_SYSTEM_XXX=1
andLDFLAGS=-Wl,-rpath,/path/to/dir/contains/libXXX.so
inMake.user
.- Instead of setting
LDFLAGS
, putting the library directory into the environment variableLD_LIBRARY_PATH
(at both compile and run time) also works.
- Instead of setting
- The
USE_SYSTEM_*
flags should be used with caution. These are meant only for troubleshooting, porting, and packaging, where package maintainers work closely with the Julia developers to make sure that Julia is built correctly. Production use cases should use the officially provided binaries. Issues arising from the use of these flags will generally not be accepted. - See also the external dependencies.