我已经试了两天了。我有OSX和Homebrew的最新版本。我遵循了一个教程,让我通过Homebrew安装pip,然后建议安装Fabric from Homebrew with:
brew install Fabric
但"自制"中的"织物"配方已不复存在。是的,我也运行了更新。所以我遵循了另一个教程,建议我通过pip进行安装。pip安装结构
它在涉及pycrypto的所有方面都失败了。这是pip日志。Mac不应该让生活更轻松吗?
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip-1.4-py2.7.egg/pip/commands/install.py", line 241, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/usr/local/lib/python2.7/site-packages/pip-1.4-py2.7.egg/pip/req.py", line 1277, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/pip-1.4-py2.7.egg/pip/req.py", line 622, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "/usr/local/lib/python2.7/site-packages/pip-1.4-py2.7.egg/pip/util.py", line 670, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command /usr/local/opt/python/bin/python2.7 -c "import setuptools;__file__='/private/tmp/pip-build-root/pycrypto/setup.py';exec(compile(open(__file__).read().replace('rn', 'n'), __file__, 'exec'))" install --record /tmp/pip-DDW_Gb-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/tmp/pip-build-root/pycrypto
原来是:
pip install fabric
以前它对我不起作用,因为我使用的是Mac OSX,从来没有人告诉我必须安装Command Line Tools
才能真正对Mac做任何有用的事情(这一点真的应该得到更好的强调,因为在我安装这些工具之前,由于编译错误,我直到12月才最终安装Fabric)。