New python virtual environment

1, set the domestic watercress source

Temporarily enable watercress source

pip install -i https://pypi.douban.com/simple/  virtualenvwrapper

Permanent changes to domestic sources

#### windows setting 

  1 address bar% appdata% 

  2 New pip folder 

  3 folder build pip.ini 

    [, Ltd. Free Join] 
    timeout = 6000 
    index-url = https://mirrors.aliyun.com/pypi/simple/ 
    Host-mirrors.aliyun.com = Trusted 


#### Linux set 
(. 1) CD ~ 
(2) ~ mkdir / .pip 
(. 3) ~ VI / .pip / pip.conf 
(. 4) edits and windows exactly

2, installation virtualenvwrapper

pip install -i https://pypi.douban.com/simple/  virtualenvwrapper

3, configure the environment variables WORKON_HOME

Set the environment variable WORKON_HOME, its value is set to D: \ Envs

The value of the environment variable WORKON_HOME, is to create a virtual directory using virtualenv environment resides.

4, create, view, use the virtual environment

create

mkvirtualenv py3learn

 View

 workon

Enter the virtual environment

workon py3learn

  

 

Guess you like

Origin www.cnblogs.com/jonah/p/11595068.html