作者:祝图net | 来源:互联网 | 2023-08-15 20:50
fabric并不支持python3.x。
安装python2.7的步骤如下:
首先安装python2.7:
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
tar zxf Python-2.7.3.tgz
cd Python-2.7.3
./configure –prefix=/usr/local/python27
make -j8 && make install
安装 setuptools + pip
这里需要注意,一定要使用 python2.7 来执行相关命令。
# First get the setup script for Setuptools:
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py# Then install it for Python 2.7 :
python2.7 ez_setup.py# Now install pip using the newly installed setuptools:
easy_install-2.7 pip# With pip installed you can now do things like this:
pip2.7 install [packagename]
pip2.7 install
pip2.7 uninstall [packagename]
此时可以安装fabirc:
pip2.7 install fabric