Python 3 Virtualenv Ubuntu Usage Guide

December 9, 2017 | By the+gnu+linux+evangelist | Filed in: Tutorial.

Python 3 Virtualenv Ubuntu Usage

You are Welcome! The Tutorial Shows You Step-by-Step How to Getting-Started with Python 3.X Virtualenv on Ubuntu 16.04 Xenial LTS i386/amd64 GNU/Linux.

And a Python 3 Virtualenv on Ubuntu 16.04 Setup make use of the Python 3 venv Tool to Make Virtual Environments.

Finally, each venv Virtual Environment has its own Python binary and can have its own independent set of installed Python packages in its site directories.

Python 3 Virtualenv Ubuntu Usage Guide - Featured
  1. Open a Terminal Shell emulator window
    Ctrl+Alt+t on Desktop
    (Press “Enter” to Execute Commands)

    Python 3 Virtualenv Ubuntu Usage Guide - Open Terminal Shell Emulator
  2. Install Virtualenv Python 3 on Ubuntu

    Virtualenv Python 3 Install Guide
  3. To Make a Python 3 Virtual Environmnet

    python3 -m venv test ~/Envs/test
  4. Then to Activate Virtual Environment

    source ~/Envs/test/bin/activate
  5. To List All the Existing Virtual Environments

  6. To Switch the Virtual Environmnet

    python3 -m venv test ~/Envs/essai
    source ~/Envs/essai/bin/activate

    Show the Working Virtual Env:

    echo $VIRTUAL_ENV
  7. To Install Software into the Virtual Environmnet.

    For Example:

    pip install django
  8. To List All the Virtual Environmnet Packages

  9. To Automatically Run a Command after Environment Creation

    echo '[bash-command]' > $WORKON_HOME/postactivate

    For Instance to Automatically Change to the New Env Directory:

    echo 'cd $VIRTUAL_ENV' > $WORKON_HOME/postactivate
  10. To Automatically Installing Commonly Used Tools

    echo 'pip install [myGoodTool]' > $WORKON_HOME/postmkvirtualenv

    For Example:

    echo 'pip install sphinx' > $WORKON_HOME/postmkvirtualenv
  11. Getting-Started with Python Selenium Testing Browser Environment:

    Quick-Start with Selenium Python Client

Tags: , , ,

QuickChic Theme • Powered by WordPress