windows install python virtual environment

Environmental
Windows7
python3.7.2

Installation
into the official website: https://www.python.org/downloads(windows )
Select: Windows x86-64 web-based installer

Test python -V

pip domestic source
V2EX: http://pypi.v2ex.com/simple
watercress: http://pypi.douban.com/simple
University of Science and Technology of China: http://pypi.mirrors.ustc.edu.cn/simple
Qinghua : https://pypi.tuna.tsinghua.edu.cn/simple
Ali cloud http://mirrors.aliyun.com/pypi/simple/

Replacement source,
pip corresponding version Installation
https://www.lfd.uci.edu/~gohlke/pythonlibs/

modifying the windows
open user directory% Users / $ {username} / %, such as (C: / Users / username /), pip created folder in this directory

Modify the linux
modify ~ / .pip / pip.conf, there is no need to manually create

  1. 修改 pip.conf
    [global]
    index-url = http://mirrors.aliyun.com/pypi/simple/
    [install]
    use-mirrors = true
    mirrors = http://mirrors.aliyun.com/pypi/simple/
    trusted-host = pypi.douban.com

2. temporarily modify
PIP install backage -i http://mirrors.aliyun.com/pypi/simple/

安装 virtualenv
pip install virtualenv
pip install virtualenvwrapper -i http://mirrors.aliyun.com/pypi/simple/

  virtualenvwrapper 使用
    workon  查看虚拟环境

workon test test into the virtual environment
mkvirtualenv test created a virtual environment and enter
deactivate exit the virtual environment

Guess you like

Origin blog.51cto.com/zailushang/2429079