Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Julia 1.0 Programming Cookbook

You're reading from   Julia 1.0 Programming Cookbook Over 100 numerical and distributed computing recipes for your daily data science work?ow

Arrow left icon
Product type Paperback
Published in Nov 2018
Publisher Packt
ISBN-13 9781788998369
Length 460 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Przemysław Szufel Przemysław Szufel
Author Profile Icon Przemysław Szufel
Przemysław Szufel
Bogumił Kamiński Bogumił Kamiński
Author Profile Icon Bogumił Kamiński
Bogumił Kamiński
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Installing and Setting Up Julia FREE CHAPTER 2. Data Structures and Algorithms 3. Data Engineering in Julia 4. Numerical Computing with Julia 5. Variables, Types, and Functions 6. Metaprogramming and Advanced Typing 7. Handling Analytical Data 8. Julia Workflow 9. Data Science 10. Distributed Computing 11. Other Books You May Enjoy

Installing Julia from binaries

The goal of this recipe is to present how to install and configure the Julia environment with the development toolbox. We show basic installation instructions for Linux and Windows.

Getting ready

In this recipe, we present how to install and configure Julia on Windows and Linux.

All Linux examples in this book have been tested on Linux Ubuntu 18.04.1 LTS and Windows 10. All Linux Ubuntu commands have been run as the user ubuntu. Please note that users of other Linux distributions will need to update their scripts (for example, Linux distributions from the Red Hat family use yum instead of apt).

For Windows examples in this book, we use Windows 10 Professional.

In the GitHub repository for this recipe you will find the commands.txt file that contains the presented sequence of shell commands.

How to do it...

For most users, the recommended way to start with Julia is to use a binary version.

In this section, we present the following options:

  • Installing Julia on Linux Ubuntu
  • Installing Julia on Windows

Installing Julia on Linux Ubuntu

Installing the binary release is the easiest way to proceed with Julia on Linux. Here, we show how to install Julia on Ubuntu, although the steps will be very similar for other Linux distributions.

Before the installation and use of Julia, we recommend installing a standard set of build tools for the Linux platform. Although this is not required for running Julia itself, several Julia package installers assume that the standard build tools set is present on the operating system. Hence, run the following commands in bash:

$ sudo apt update
$ sudo apt -y install build-essential

In order to install Julia, simply download the binary archive from julialang.org, uncompress it, and finally create a symbolic link named Julia. These steps are shown in the following three bash commands (we assume that these commands are run in the /home/ubuntu folder):

$ wget https://julialang-s3.julialang.org/bin/linux/x64/1.0/julia-1.0.1-linux-x86_64.tar.gz
$ tar xvfz julia-1.0.1-linux-x86_64.tar.gz
$ sudo ln -s /home/ubuntu/julia-1.0.1/bin/julia /usr/local/bin/julia

Please note that the last command creates a symbolic link to the Julia binaries. After this installation, it is sufficient to run the julia command in the OS shell to start working with Julia. 

Please note that on the Julia web page (https://julialang.org/downloads/), a newer version of the installer could be available. You can update the preceding script accordingly by simply updating the filename. Additionally, nightly build Julia versions are available on the preceding website. These versions are only recommended for testing new language features.

Installing Julia on Windows

The most convenient way to install Julia on Windows is by using the binary version installer available from the JuliaLang website.

The following steps are required to install Julia on a Windows system:

  1. Download the Windows Self-Extracting Archive (.exe) from https://julialang.org/downloads/. It is recommended to select the 64-bit version.
  2. Run the downloaded *.exe file to unpack Julia. We recommend extracting Julia into a directory path that does not contain any spaces, for example, C:\Julia-1.0.1.
  3. After a successful installation, a Julia shortcut will be added to your start menu—at this point, you can select the shortcut to see whether Julia loads correctly.
  4. Add julia.exe to your system path, as follows:
    1. Open Windows Explorer, right-click on the This PC computer icon, and select Properties.
    2. Click Advanced system settings and go to Environment Variables....
    3. Select the Path variable and click Edit....
    4. To the variable value, add C:\Julia-1.0.1\bin (in this instruction, we assume that Julia has been installed to C:\Julia-1.0.1). Please note that, depending on your Windows version, there is either one Path value per line or a semicolon ; is used to separate values in the Path list.
    5. Click OK to confirm. Now, Julia can be run anywhere from the console.

When adding julia.exe to your system path, please note that there are two variable groups on this screen, User variables and System variables. We recommend using User variables. Please note that adding julia.exe to the system Path makes it possible for other tools, such as Juno, to automatically locate Julia (Juno also allows for manual Julia path configuration—this can be found in the option marked Packages | Julia client | Settings).

For the most convenient workflow, we recommend installing the ConEmu terminal emulator for Windows users. 

The steps to install ConEmu on your Windows system are as follows:
  1. Go to the ConEmu website (http://conemu.github.io/) and click the Download link. Select Download ConEmu Stable Installer.
  2. Once you download the *.exe file, run it to install ConEmu. Select the 64-bit version in the installer; other settings can keep their default values.
  3. Once ConEmu is installed, a new link in the start menu and on the desktop will be created.
  4. During the first application run, ConEmu asks about color settings—just stay with the defaults. Run ConEmu, type julia, and press Enter, and you should see a Julia prompt.

There's more...

Those users who want to try Julia without the installation process should try JuliaBox.

JuliaBox is a ready-made pre-installed Julia environment accessible from the web browser. It is available at https://juliabox.com/. You can use this version to play with a preconfigured and installed version of the Julia environment. Julia is available in a web browser via the Jupyter Notebook environment. The website is free to use, though it does require registration. JuliaBox comes with a set of pre-configured popular Julia libraries and is therefore ready for immediate use. This is an ideal solution for people wanting to try out the language or for using Julia inside a classroom.

See also

You have been reading a chapter from
Julia 1.0 Programming Cookbook
Published in: Nov 2018
Publisher: Packt
ISBN-13: 9781788998369
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image