溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

Linux環(huán)境下virtual env的部署和使用

發(fā)布時(shí)間:2020-06-30 14:53:40 來源:網(wǎng)絡(luò) 閱讀:195 作者:邱團(tuán)長(zhǎng) 欄目:編程語(yǔ)言

如下示例演示了使用pip安裝virtual,并建立虛擬環(huán)境VMware-Python-sdk,切換至虛擬環(huán)境,退出虛擬環(huán)境

[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問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI