CENTOS7 64位 mini 環境下安裝Fabric
阿新 • • 發佈:2019-02-06
1、在root的許可權下,執行
yum -y install python-setuptools
yum -y install net-tools
yum -y install wget
wget https://pypi.python.org/packages/source/F/Fabric/Fabric-1.8.2.tar.gz --no-check-certificate
tar -zxvf Fabric-1.8.2.tar.gz
2、安裝編譯環境
yum install gcc
yum install gcc-c++
yum install make
yum install clang
yum install clang-analyzer
3、進入 Fabric目錄下
執行 python setup.py install,報錯 No package 'libffi' found
執行 yum install libffi-devel,libffi問題解決
但報錯 fatal error:python.h No such file or directory
執行 yum install python-devel.x86_64,python.h 問題解決
執行 python setup.py install ,報錯
Installed /tmp/easy_install-cgIYVU/cryptography-2.1.4/pycparser-2.18-py2.7.egg
error: Setup script exited with error in cryptography setup command: Invalid environment marker: python_version < '3'
4、安裝 python-pip
執行 yum install epel-release
執行 yum install python-pip
5、pip安裝成功,執行 pip install --upgrade setuptools
6、再一次執行 python setup.py install
Finished processing dependencies for Fabric==1.8.2 ,安裝結束
7、進入python後,測試
from fabric.api import run
報錯 ImportError: No module named Crypto
8、
pip install --upgrade pip
執行 pip install pycrypto
進入python後,測試
from fabric.api import run
測試成功
yum -y install python-setuptools
yum -y install net-tools
yum -y install wget
wget https://pypi.python.org/packages/source/F/Fabric/Fabric-1.8.2.tar.gz --no-check-certificate
tar -zxvf Fabric-1.8.2.tar.gz
2、安裝編譯環境
yum install gcc
yum install gcc-c++
yum install make
yum install clang
yum install clang-analyzer
3、進入 Fabric目錄下
執行 python setup.py install,報錯 No package 'libffi' found
執行 yum install libffi-devel,libffi問題解決
但報錯 fatal error:python.h No such file or directory
執行 yum install python-devel.x86_64,python.h 問題解決
執行 python setup.py install ,報錯
Installed /tmp/easy_install-cgIYVU/cryptography-2.1.4/pycparser-2.18-py2.7.egg
error: Setup script exited with error in cryptography setup command: Invalid environment marker: python_version < '3'
4、安裝 python-pip
執行 yum install epel-release
執行 yum install python-pip
5、pip安裝成功,執行 pip install --upgrade setuptools
6、再一次執行 python setup.py install
Finished processing dependencies for Fabric==1.8.2 ,安裝結束
7、進入python後,測試
from fabric.api import run
報錯 ImportError: No module named Crypto
8、
pip install --upgrade pip
執行 pip install pycrypto
進入python後,測試
from fabric.api import run
測試成功