Open In App
Related Articles

How to install NumPy package in Julia?

Improve Article
Improve
Save Article
Save
Like Article
Like

Julia is a very new and fast high-level programming language and has the power to compete with python. Like python, Julia is also compatible to do machine learning and data analysis part. In this tutorial, we will learn about how to install NumPy and use it in our Julia environment.

Checking for a pre-installed Julia Version:

Before we begin with the installation of Julia, it is good to check if it might be already installed on your system. To check if your device is preinstalled with Julia or not, just go to the Command line(search for cmd in the Run dialog( + R)).
Now run the following command:

julia

Julia-PreInstallation-Check

If Julia is not installed, please follow the steps on How to Install Julia on Windows?

Installing NumPy package

Follow these steps to make use of libraries like NumPy in Julia:

Step 1: Use the Using Pkg command to install the external packages in Julia.

using Pkg

Step 2: Add the PyCall package to install the required python modules in julia and to do so use the command given below:

Pkg.add("PyCall")

Step 3: In this step, we have to use the PyCall package and for that use the following command:

using PyCall

Step 4: And Here we go, this is the final statement which we use to complete the setup for numpy.

np = pyimport("numpy")

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 17 May, 2020
Like Article
Save Article
Previous
Next
Similar Reads