Installing the Python Development environment (VIRTUALENV and Virtualenvwrapper) in Ubuntu

Source: Internet
Author: User

A virtual environment for Virtualenv:linux

Virtualenvwrapper: Based on a tool on the virtualenv, it is easy to create/activate/manage/Destroy the virtual environment, without it, the above operation will be quite cumbersome.

Installing Python3

sudo apt-get install Python3

sudo apt-get install Python-setuptools


Install PIP

sudo apt-get install pip


Installing Virtualenv and Virtualenvwrapper

$sudo Apt-get Install Python-virtualenv

$sudo Easy_install Virtualenvwrapper


1. Create a directory to store the virtual environment

mkdir $HOME/.virtualenvs

2. Add lines in ~/.BASHRC:

Export Workon_home= $HOME/.virtualenvs

source/usr/local/bin/virtualenvwrapper.sh

3. Run:

Source ~/.BASHRC

3. Create a Python virtual environment

mkvirtualenv [Virtual Environment name]

4. Switch the virtual environment

Workon [Virtual Environment name]

5. Exiting the virtual environment

Deactivate

6. Deleting a virtual environment

rmvirtualenv [Virtual environment name]


Note: Created environment is independent, non-interference, without sudo permissions can use PIP to manage the package, if you use sudo installed in the virtual environment package in the main environment


Specify the version of Python in the virtual environment using the-p parameter

$ mkvirtualenv-p Python Django



To install Redis, perform the following command in Ubuntu:

$sudo Apt-get Install Redis-server

Start the service side

$redis-server

Start the client

$redis-CLI



Browser cache

Ctrl+shift+del Clear Google browser cache shortcut keys

Ctrl+shift+r Reload the current Web page without using cached content



This article is from the "Ride a Pig to Travel" blog, please be sure to keep this source http://songqinglong.blog.51cto.com/7591177/1934889

Installing the Python Development environment (VIRTUALENV and Virtualenvwrapper) in Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.