01:centos using Virtualenv to build a standalone Python environment-python virtual environment

Source: Internet
Author: User
Tags virtual environment virtualenv

1.1 Installing the VIRTUALENV environment

Https://www.cnblogs.com/liuyansheng/p/6141197.html

1, installation Virtualenv

Yum Install python-virtualenv

2. Create a Python virtual environment

Virtualenv env # After execution, a folder with the same name as the virtual environment will be generated locally

3. Start the virtual environment  

SOURCE Bin/activate # Launch Virtual Environment

Deactivate # exiting the virtual environment

1.2 Virtual Environment Replication migration

1. Directly compress the generated Venv folder

TAR-ZCVF venv.tar. gz./venv

2. Then copy the migration to the other server for decompression

Note: Enter the parameters in the./venv/bin/under Modify Activate file

virtual_env= "/home/venv" Export virtual_env

1.3

01:centos using Virtualenv to build a standalone Python environment-python virtual environment

Related Article

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.