Tag archive for: python3-venv

How to use Python 3 virtual environments to run Python 3 applications on your Raspberry Pi

Whenever I am working on a Python 3 project, I will always use a Python 3 virtual environment for running that project. Therefore, I tend to do the same when it comes to .

If you are looking to build Python 3 applications to run on your Pi, then you may find this article useful for you.

How to use NSSM to run a Python 3 application as a Windows Service in its own Python 3 virtual environment

If you want to run a Python 3 application as a Windows Service, then you are going to love NSSM. Since NSSM handles the life cycle of a Windows Service for our Python 3 application, we can keep it platform agnostic.

Previously, we saw how we can use a Python 3 virtual environment in Windows 10. Given that, let’s see how we can use NSSM to run a Python 3 application as a Windows Service in its own Python 3 virtual environment.

How to create a virtual environment for your Python 3 application with python3-venv in Linux or Unix

The python3-venv module allows us to create lightweight “virtual environments” with their own site directories, optionally isolated from system site directories. Given that, we will be able to run multiple Python 3 environments with varying dependencies on the same computer.

This post shows how to create a virtual environment for your Python 3 application with python3-venv in Linux or Unix.

How to use a Python 3 virtual environment in Windows 10

When you need each Python 3 application that you are building to run in its own isolated environment, you can turn to virtual environments.

Since Python is available on Windows 10, you can also use virtual environments on Windows 10.

Typically, using a Python 3 virtual environment in Windows 10 involves the following steps:

  1. Installing Python 3 with pip and several features.
  2. Creating a Python 3 virtual environment with Python 3 venv module.
  3. Activating the Python 3 virtual environment.
  4. Installing Python 3 packages that your Python application is using into the virtual environment.
  5. Running your Python 3 application within the Python 3 virtual environment.
  6. Deactivating the Python 3 virtual environment.

How to install python3-venv on Ubuntu 16.04

Since Ubuntu 16.04 is a very popular operating system, it is one operating system that you will likely come across when you are building software with Python 3. For example, if you want to get a Nvidia Jetson TX2 developer kit today, you will find yourself dabbling with Ubuntu 16.04.

On the other hand, the venv module of Python 3 is one recommended way to create virtual environments for our Python 3 projects.

In case you need it, this post describes how to install python3-venv on Ubuntu 16.04.