Python: Sandbox (virtualenv)

Source: Internet
Author: User
Tags virtual environment virtualenv

You can use a sandbox when your computer needs to use multiple versions of Python, or use Docker;

Virtualenv is a python-brought, installed by Pip

[[email protected] public]#CD jinjie_python/[[email protected] Jinjie_python]#virtualenv test1Using Base Prefix'/usr/local'New python executableinch/root/public/jinjie_python/test1/bin/python3.5Also Creating executableinch/root/public/jinjie_python/test1/bin/pythoninstalling Setuptools, Pip, Wheel...done. [[email protected] Jinjie_python]#[[email protected] Jinjie_python]#CD test1/[[email protected] test1]#lsbin include Lib[[email protected] test1]#Source Bin/activate(test1) [[email protected] test1]#PIP3 ListAppdirs (1.4.3) Packaging (16.8) Pip (9.0.1) pyparsing (2.2. 0) Setuptools (35.0.2) Six (1.10. 0) Wheel (0.29. 0) (test1) [[email protected] test1]# 

1, virtualenv test1 set up sandbox

2. CD to sandbox directory, execute source bin/activate, start sandbox environment

3, deactivate exit sandbox environment

Note:

By default, the virtual environment relies on site packages in the system environment, which means that the installed third-party package in the system is also installed in the virtual environment.

If you do not want to rely on these package, then you can add parameters

--no-site-packages

Python: Sandbox (virtualenv)

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.