How to Import Python Package into Julia on Windows

959
How to Import Python into Julia
How to Import Python Package into Julia on Windows

In this short tutorial, We will show you how to import Python package into Julia on Windows 10.

Python was released in 1991 with a vision of creating a general-purpose programming language. Julia language was launched in 2012 ( Julia 1.0 Version).

To get started on windows, you need to install Julia language and Jupyter notebook.

After completing the Julia installation, you just connect with each other for coding purposes.

For this tutorial, we will be using the Jupyter Notebook for screenshots and examples on Windows 10.

We recommend using free Anaconda Distribution.

Steps to Import Python Package into Julia on Windows

In this section, we will show you how to import Python package into Julia.

Follow the below steps to import Python package into Julia on Windows 10.

Step #1 Open Jupyter Notebook IDE

To open the Jupyter Notebook, you need to select anaconda navigator from the start menu.

Below is the screenshot of Anaconda Navigator.

Anaconda Navigator for Opening the Jupyter Notebook
Anaconda Navigator

Step #2: Download and Install Julia on Windows

Now, you open the notebook. To open the Jupyter notebook, click on the Launch button.

After opening the Jupyter notebook, select Julia 1.4.1. Here, we have downloaded and installed Julia 1.4.1 version. Julia Programming language is as fast as C language.

The following window will appear:

Julia in Jupyter Notebook to import Python Package into Julia on Windows
Julia Language in Notebook

Step #3: Python Package Installation

Here, you install and add the PyCall package using Jupyter.

Once the commands are executed, it will install PyCall along with its dependencies.

Below is the screenshot of the installation.

Import and installation pycall python package in Julia on Windows
PyCall Installation

Let us check things are configured correctly.
Here, we write a simple code to check the setup.

We will use the NumPy Python package for the sake of the experiment.

This is a fast and flexible package for numerical computing in Python.

Python Package is now included in Julia on Windows after importing Python Package
Final Result

Hopefully this short article was useful to you !

LEAVE A REPLY

Please enter your comment!
Please enter your name here