Skip to content

Getting started

peterstratton edited this page Apr 8, 2021 · 15 revisions

Welcome to the Robotics-Workshop wiki!

The following steps show how to install each component. Please contact the instructor team in the case that you encountered any problem.

Check Python version

You need to have Python and pip tool installed. Open a terminal (PowerShell for Windows users) and type:

python -V

or

python3 -V

If you see this Python version or higher, skip the next part. (For Windows users, don't skip)

Python 3.7.0

Pip tool should already be installed in this Python version or higher.

Install Python 3.7

If you have already installed Python 3.7 or higher, you may skip this part. (For Windows users, double check regardless)

Ubuntu / Mac

  1. Open a terminal and start by updating the packages list and installing the prerequisites:
sudo apt update
sudo apt install software-properties-common

  1. Next, add the deadsnakes PPA to your sources list:
sudo add-apt-repository ppa:deadsnakes/ppa

When prompted press Enter to continue.

  1. Once the repository is enabled, install Python 3.7 with:
sudo apt install python3.7

  1. At this point, Python 3.7 is installed on your Ubuntu system and ready to be used. You can verify it by typing:
python3.7 --version

Windows

  1. If you have Python installed before but don't remember having added Python to PATH or not, uninstall Python.
  2. Download the installer file of the latest Python 3 stable release at Python.org
  3. Install, remember to select the checkbox 🔳 Add Python 3.9 to PATH
  4. Customize installation to an easy to find location, like C:\Python39
  5. Disable Python.exe and Python3.exe App Installers in Settings > Manage App Execution Aliases

Pipenv

Pipenv is a tool that automatically creates and manages a virtualenv for your projects, as well as adds/removes packages from your Pipfile as you install/uninstall packages. In simple terms, pipenv helps you to install dependencies for your project without overwriting packages from other projects.

In order to install pipenv, type the following in your terminal:

pip install pipenv --user

For Windows users: ignore the warning/suggestion to upgrade pip.

Installing Python Packages

Ubuntu / Mac

git clone https://github.com/ExistentialRobotics/robotics-workshop.git
cd robotics-workshop
pipenv install --skip-lock
pipenv shell

Windows

  1. Download and extract ZIP file of the workshop's repo to an easy to find location.
  2. Go into folder where Pipfile is located.
  3. Open Pipfile with any text editor and modify the line python_version = "3.7" to your version (e.g. 3.9).
  4. Shift + Right Click (while not selecting any file) and choose "Open PowerShell window here".
  5. To install the virtual environment (with dependencies stated in Pipfile):
pipenv install --skip-lock
  1. To activate this project's virtualenv:
pipenv shell
  1. cd to the specific project folder as needed.

PyCharm (Optional)

PyCharm is an Integrated Development Environment (IDE) used for programming in Python. You can execute the demo scripts via PyCharm terminal instead of activating robotics-workshop virtual environment.

  1. Go to the PyCharm download page.
  2. Select the proper operating system and choose the Community version.
  3. Download the .zip file. It should be in the Downloads folder. Open the file explorer, navigate to the Downloads folder, and extract the .zip file into the Downloads folder. You will find a folder named pycharm-community-2020.X.X.
  4. In order to start PyCharm, follow the below steps:
  • Open a terminal.
  • Change directory to pycharm-community-2020.X.X/bin:
       cd ~
       cd Downloads/pycharm-community-2020.3.5/bin/

  • Run ./pycharm.sh in your terminal and the JetBrains Privacy Policy window should open.
  • Click Continue and PyCharm should finish downloading. The PyCharm welcome window should then open.
Clone this wiki locally