Python Environment Setup

In this tutorial, we will introduce how to set-up a Python coding environment for VIA Pixetto.

This tutorial includes five steps in total
Step 1: Download Python
Step 2: Use ‘pip3’ to download the packages required for VIA Pixetto
Step 3: Download Jupyter Notebook
Step 4: Download VIA Pixetto’s function database
Step 5: Set-up Jupyter Notebook file

Step 1

First, we need to download Python.
Open the website ( https://www.python.org/ ) and head to the ‘Downloads’ drop down menu.

Python wepage

 

Select ʻPython 3.X.Xʼ to download Python.

Python version

 

Check ʻInstall launcher for all users (recommended)ʼ and ʻAdd Python 3.8 to PATHʼ then click ʻInstall Nowʼ.

Python Installation

 

Once the ʻSetup was successfulʼ window appears, this means you have successfully downloaded Python!

Python for Windows

 

Step 2

To make sure VIA Pixetto can operate in Python’s coding environment, we need to download ʻpyserialʼ package.

First, type ʻcmdʼ into the search bar in the lower left corner of the screen and open ʻCommand Promptʼ.

Python Command prompt

 

Insert the command:

  pip3 install pyserial

Python coding environment

 

Step 3

Download Jupyter Notebook to code with Python.
Open ʻCommand Promptʼ, then insert the following command into the window:

  pip3 install jupyter

Python coding environment

 

Step 4

Create a folder on your personal computer as your Project Folder.

Python coding environment

 

The new folder must include the Pixetto library.

  i. Click the link ( http://cdn.viaembedded.com/Pixetto/python3-pixetto-0.0.1.zip ) to download.

Python coding environment

 

  ii. Unzip the downloaded file to get ‘pixetto.py’ and other files.

Python coding environment

 

  iii. Copy all files into your newly created Project Folder.

Python coding environment

 

Step 5

Open Jupyter Notebook in Project Folder.

A. In ‘Command Prompt’, change the path to your newly created folder.

  i. Copy the folder path

Python coding environment

 

  ii. Insert command ʻcdʼ to switch paths.

  cd C:\Users\username\Desktop\Pixetto-python

Python coding environment
Python coding environment

 

B. After switching path, insert the command:

  jupyter notebook

Python coding environment

 

The computer will automatically open ‘localhost’ window. Select ‘New’ and then select ‘Python 3’.

python environment setup image 15

 

Python coding environment
Python coding environment

 

Now, you can program VIA Pixetto using Python on this webpage.

Make sure to keep ʻCommand Promptʼ open while coding.

Python coding environment

 

Congratulations with finishing the Python coding environment set-up for Pixetto! You can now experiment with your own coding creations on your computer. Have fun and donʼt forget to share your projects with #VIAPixetto on social media!

 

Share this blog post!

Share on linkedin
Share on twitter
Share on facebook

Leave a Reply