温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Linux环境下virtual env的部署和使用

发布时间:2020-06-30 14:53:40 来源:网络 阅读:198 作者:邱团长 栏目:编程语言

如下示例演示了使用pip安装virtual,并建立虚拟环境VMware-Python-sdk,切换至虚拟环境,退出虚拟环境

[root@shansibleqa ~]# pip install virtualenv
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting virtualenv
  Downloading https://files.pythonhosted.org/packages/62/77/6a86ef945ad39aae34aed4cc1ae4a2f941b9870917a974ed7c5b6f137188/virtualenv-16.7.8-py2.py3-none-any.whl (3.4MB)
     |████████████████████████████████| 3.4MB 22kB/s 
Installing collected packages: virtualenv
Successfully installed virtualenv-16.7.8  
[root@shansibleqa ~]# virtualenv /opt/vmware-python-sdk
  No LICENSE.txt / LICENSE found in source
New python executable in /opt/vmware-python-sdk/bin/python2
Also creating executable in /opt/vmware-python-sdk/bin/python
Installing setuptools, pip, wheel...
done.
[root@shansibleqa ~]# source /opt/vmware-python-sdk/bin/activate
(vmware-python-sdk) [root@shansibleqa ~]# 
(vmware-python-sdk) [root@shansibleqa ~]# 
(vmware-python-sdk) [root@shansibleqa ~]# deactivate
向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI