我已经尝试了两天才能弄明白这一点。我有最新版本的OSX和Homebrew。我按照一个教程,让我通过Homebrew安装pip,然后建议从Homebrew安装Fabric:
brew install Fabric
但Fabric的配方已经从Homebrew消失了。是的,我也进行了更新。所以我按照另一个教程建议我通过pip安装。 pip install fabric
它以涉及pycrypto的各种方式失败。这是点子日志。 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('\r\n', '\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
答案 0 :(得分:3)
所以它是:
pip install fabric
以前这对我不起作用,因为我在Mac OSX上没有人告诉过我必须安装Command Line Tools
来实际做任何对Mac有用的事情(这应该更好地强调,因为它是直到十二月才把我带到最后安装Fabric,因为在我安装这些工具之前会出现一些错误。