How to install NumPy package in Julia?

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")

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.