Python Virtual Environment configuration

Source: Internet
Author: User
Tags virtual environment virtualenv

Brief introduction

Configure the Python sandbox environment.

Installation steps

1, installation Pyenv

Reference: Https://github.com/yyuu/pyenv-installer, the following two ways:

Mode 1:

The first step: Execute in your own user directory

Curl-l https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash

The second step: After the above operation is usually in the command line will appear the following prompt, add it to ~/.BASHRC, source ~/.BASHRC to make it effective, so our pyenv is initially installed successfully.

' pyenv ' To the load path:export pyenv_root="${home}/.pyenv"if"$ {Pyenv_root} "  Then   export PATH="${pyenv_root}/bin:${path}"     "$ (pyenv init-)"fi

Mode 2:

Using Pip, execute the following command

Pip Install--egg pyenv

2, Installation Virtualenv

3. Establish and activate the sandbox environment:

Reference: Https://packaging.python.org/en/latest/installing.html#virtual-environments

Virtualenv <DIR><dir>/bin/activate

Python Virtual Environment configuration

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.