windows安装fabric遇到的若干问题
fabric是instagram团队使用的自动化部署工具,花了一个早上试用了一下,一个hello world就遇到了各种问题。这里是在windows环境中进行的安装。
1.源码安装pycrypto不成功 提示: error: Python was built with Visual Studio 2003; extensions must be built with a compiler than can generate compatible binaries. Visual Studio 2003 was not found on this system. If you have Cygwin installed, you can try compiling with MingW32, by passing "-c mingw32" to setup.py. 解决: 1)setup.py install --skip-build 参考http://stackoverflow.com/questions/2261866/how-to-install-python-ssl-module-on-windows 2)使用msi或者exe文件来安装
2.找不到fab命令 fab.exe在python安装目录的Scripts目录,比如我的目录D:\Program Files\Python25\Scripts 找到后加入到环境变量Path中,即可使用fab来执行了。
3.执行fab提示找不到fabfiles D:>fab hello Fatal error: Couldn't find any fabfiles! Remember that -f can be used to specify fabfile path, and use -h for help. Aborting. 原因:跟python的PYTHONPATH有关系,如果fabfile.py没有放在PYTHONPATH中,会提示找不到。 解决:使用-f指定文件 D:>fab -f ./fabfile.py hello