Get Started¶
PYTHON AND MOBLABPY INSTALLATION GUIDE¶
Installing and managing packages in Python is complicated, there are a number of alternative solutions for most tasks. This guide tries to give the reader a sense of the best (or most popular) solutions, and give clear recommendations. It focuses on users of Python and the Moblabpy on common operating systems and hardware.
PYTHON AND MOBLABPY INSTALLATION (WINDOWS USERS)¶
Check if Python is already installed (You can type python –version on cmd). If you have already installed Python, you can skip the next two steps, otherwise, please follow the next step to install Python.
Install Python here and select the most recent version.
Follow the instruction of the installer and finish installation. Make sure to tick the option Add Python 3.x (the version that you download) to PATH at the start of the installer window.
After the installation finished, press
Winkey, type cmd and hitEnter.Type
pip install moblabpyin the cmd to install Moblabpy.
PIP IS NOT RECONGNIZED AS AN INTERNAL OR EXTERNAL COMMAND¶
If you see the pip is not recognized as an internal or external command when you type pip install moblabpy
in the cmd. It means that you forgot to add Python in PATH during the installation of Python. You can add it
by the following step:
Press
Win + R, type%AppData%and hitEnterBack out one directory from Roaming
Navigate to
Local/Programs/Python/Python39/ScriptsCopy the file path by selecting the whole directory in the address bar
Press
Win, type Control Panel and hitEnterNavigate to System and Security → System → Advanced System Setting → Environment Variables
Select Path in the top box and Edit
Select New and paste the file path copied from step 4
PYTHON AND MOBLABPY INSTALLATION (MAC USERS)¶
Same as step 1 to 3 of window users (terminal for mac users)
After the installation finished, press
Cmdand the space bar simultaneously, typeterminaland hitEnter.Type
pip install moblabpyin the cmd to install Moblabpy.
PIP: COMMAND NOT FOUND¶
If you see the pip: command not found when you type pip install moblabpy in the terminal.
It means that you forgot to add Python in PATH during the installation of Python. You can add it
by the following step:
Type
which python3in the terminal and the path of where python is located will be shownType
echo $PATHin the terminal and it will show the path of your machine to look for commandNavigate back to home file by typing
cdType
nano .bash_profilein the terminal and hitEnterType
PATH="path/of/bin/folder/that/you/install/your/python:${PATH}"andexport PATHin the next line and save the changesrestart the terminal and it should be fine now