fabric在python3环境的使用

1.系统环境切换到pthon3

apt-get install python2

apt-get install python3

apt-get install python-pip

apt-get install python3-pip

 

update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1

update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2

 

update-alternatives  --install /usr/bin/pip pip /usr/bin/pip2 1

update-alternatives  --install /usr/bin/pip pip /usr/bin/pip3 2

 

#切换到python3环境

update-alternatives --config python   

  Selection    Path                Priority   Status
------------------------------------------------------------
  0            /usr/bin/python3.5   2         auto mode
  1            /usr/bin/python2.7   1         manual mode
* 2            /usr/bin/python3.5   2         manual mode

Press <enter> to keep the current choice[*], or type selection number:2

 

#切换pip到pip3环境

root@www1-db1:~# update-alternatives --config pip
There are 2 choices for the alternative pip (providing /usr/bin/pip).

  Selection    Path            Priority   Status
------------------------------------------------------------
   0            /usr/bin/pip2    2         auto mode
 * 1            /usr/bin/pip2    1         manual mode
  2            /usr/bin/pip3    2         manual mode

Press <enter> to keep the current choice[*], or type selection number:2

安装fabric3

 

ImportError:No module named 'ConfigParser'

apt-get install python-configparser/xenial

 

apt-get install build-essential libssl-dev libffi-dev python3-dev

pip3 install Fabric3

 https://pypi.python.org/pypi/Fabric3

posted @ 2017-03-16 17:31  jidi_78  阅读(175)  评论(0)    收藏  举报