虚拟环境管理工具virtualenvwrapper

1、先配置环境变量

2、下面开始配置

--第一个cmd

Microsoft Windows [版本 10.0.18362.592]
(c) 2019 Microsoft Corporation。保留所有权利。

C:\Users\123>pip list
Package         Version
--------------- ----------
argh            0.26.2
beautifulsoup4  4.8.1
bs4             0.0.1
certifi         2019.11.28
chardet         3.0.4
decorator       4.4.1
idna            2.8
iso8601         0.1.12
lxml            4.4.2
m3u8            0.5.2
numpy           1.17.4
pandas          0.25.3
pathtools       0.1.2
pip             10.0.1
public          2019.4.13
pypiwin32       223
python-dateutil 2.8.1
pytz            2019.3
pywin32         225
PyYAML          5.2
reload          0.9
requests        2.22.0
self            2019.4.13
setuptools      39.0.1
six             1.13.0
soupsieve       1.9.5
urllib3         1.25.7
watchdog        0.9.0
You are using pip version 10.0.1, however version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Users\123>python -m pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl (1.4MB)
    100% |████████████████████████████████| 1.4MB 17kB/s
Installing collected packages: pip
  Found existing installation: pip 10.0.1
    Uninstalling pip-10.0.1:
      Successfully uninstalled pip-10.0.1
Successfully installed pip-20.0.2

C:\Users\123>pip list
Package         Version
--------------- ----------
argh            0.26.2
beautifulsoup4  4.8.1
bs4             0.0.1
certifi         2019.11.28
chardet         3.0.4
decorator       4.4.1
idna            2.8
iso8601         0.1.12
lxml            4.4.2
m3u8            0.5.2
numpy           1.17.4
pandas          0.25.3
pathtools       0.1.2
pip             20.0.2
public          2019.4.13
pypiwin32       223
python-dateutil 2.8.1
pytz            2019.3
pywin32         225
PyYAML          5.2
reload          0.9
requests        2.22.0
self            2019.4.13
setuptools      39.0.1
six             1.13.0
soupsieve       1.9.5
urllib3         1.25.7
watchdog        0.9.0

C:\Users\123>workon
'workon' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

C:\Users\123>pip install virtualenvwrapper-win
Collecting virtualenvwrapper-win
  Downloading virtualenvwrapper-win-1.2.5.tar.gz (21 kB)
Collecting virtualenv
  Downloading virtualenv-16.7.9-py2.py3-none-any.whl (3.4 MB)
     |████████████████████████████████| 3.4 MB 26 kB/s
Installing collected packages: virtualenv, virtualenvwrapper-win
    Running setup.py install for virtualenvwrapper-win ... done
Successfully installed virtualenv-16.7.9 virtualenvwrapper-win-1.2.5

C:\Users\123>workon

Pass a name to activate one of the following virtualenvs:
==============================================================================
找不到文件

C:\Users\123>
C:\Users\123>


--第二个cmd

C:\Users\123>workon

Pass a name to activate one of the following virtualenvs:
==============================================================================

C:\Users\123>mkvirtualenv test
Using base prefix 'd:\\pydevelop'
New python executable in F:\virtual_list\test\Scripts\python.exe
Installing setuptools, pip, wheel...
done.

(test) C:\Users\123>
(test) C:\Users\123>deactivate

C:\Users\123>
C:\Users\123>workon

Pass a name to activate one of the following virtualenvs:
==============================================================================
test

C:\Users\123>pip list
Package               Version
--------------------- ----------
argh                  0.26.2
beautifulsoup4        4.8.1
bs4                   0.0.1
certifi               2019.11.28
chardet               3.0.4
decorator             4.4.1
idna                  2.8
iso8601               0.1.12
lxml                  4.4.2
m3u8                  0.5.2
numpy                 1.17.4
pandas                0.25.3
pathtools             0.1.2
pip                   20.0.2
public                2019.4.13
pypiwin32             223
python-dateutil       2.8.1
pytz                  2019.3
pywin32               225
PyYAML                5.2
reload                0.9
requests              2.22.0
self                  2019.4.13
setuptools            39.0.1
six                   1.13.0
soupsieve             1.9.5
urllib3               1.25.7
virtualenv            16.7.9
virtualenvwrapper-win 1.2.5
watchdog              0.9.0

C:\Users\123>workon

Pass a name to activate one of the following virtualenvs:
==============================================================================
test

C:\Users\123>
C:\Users\123>mkvirtualenv spider
Using base prefix 'd:\\pydevelop'
New python executable in F:\virtual_list\spider\Scripts\python.exe
Installing setuptools, pip, wheel...
done.

(spider) C:\Users\123>deactivate

C:\Users\123>
C:\Users\123>workon

Pass a name to activate one of the following virtualenvs:
==============================================================================
spider
test

C:\Users\123>rmvirtualenv test

    Deleted F:\virtual_list\test


C:\Users\123>workon

Pass a name to activate one of the following virtualenvs:
==============================================================================
spider

C:\Users\123>
C:\Users\123>
C:\Users\123>workon

Pass a name to activate one of the following virtualenvs:
==============================================================================
spider

C:\Users\123>workon spider
(spider) C:\Users\123>
(spider) C:\Users\123>deactivate

C:\Users\123>
C:\Users\123>workon

Pass a name to activate one of the following virtualenvs:
==============================================================================
spider

C:\Users\123>
C:\Users\123>

常用命令

发布了180 篇原创文章 · 获赞 72 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/frdevolcqzyxynjds/article/details/104106149