【问题标题】:trying to install mercurial via easy_install尝试通过 easy_install 安装 mercurial
【发布时间】:2012-04-25 09:25:15
【问题描述】:

我正在使用 Active Python 2.5.1、Mercurial 1.8.1 和 TortoiseHg 1.1.0 在 Windows XP(所有 x86)上 我正在尝试在评论板中配置一个 mercurial 回购。为此它 需要 mercurial python 模块 因此,当我尝试通过 easy_install 安装 mercurial 时,我得到了 跟随错误

C:\>easy_install mercurial==1.8.1
Searching for mercurial==1.8.1
Reading http://pypi.python.org/simple/mercurial/
Reading http://mercurial.selenic.com/
Reading http://www.selenic.com/mercurial
Reading http://mercurial.selenic.com/release/
Best match: mercurial 1.8.1
Downloading http://mercurial.selenic.com/release/mercurial-1.8.1.tar.gz
Processing mercurial-1.8.1.tar.gz
Running mercurial-1.8.1\setup.py -q bdist_egg --dist-dir c:
\docume~1\username\locals~1\temp\easy_install-7l0ykf
\mercurial-1.8.1\egg-dist-tmp-egcnt6

cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: Setup script exited with error: command 'gcc' failed with exit
status 1

我已经通过MinGW安装了gcc


谢谢 shu zOMG chen,1.8.1 是一个要求,所以不能真正改变它。第二个链接确实有帮助,但现在还有另一个问题。从 distutils\cygwinccompiler.py 中删除 -mno-cygwin 出现后,我运行了 easy_install mercurial==1.8.1。跟踪如下:

C:\>easy_install mercurial==1.8.1
Searching for mercurial==1.8.1
Reading http://pypi.python.org/simple/mercurial/
Reading http://mercurial.selenic.com/
Reading http://www.selenic.com/mercurial
Reading http://mercurial.selenic.com/release/
Best match: mercurial 1.8.1
Downloading http://mercurial.selenic.com/release/mercurial-1.8.1.tar.gz
Processing mercurial-1.8.1.tar.gz
Running mercurial-1.8.1\setup.py -q bdist_egg --dist-dir c:\docume~1\username\locals~1\temp\easy_install-05el_6\mercurial-1.8.1\egg-dist-tmp-zsfye0

gcc: error: CreateProcess: No such file or directory
error: Setup script exited with error: command 'gcc' failed with exit status 1

C:\>

请帮忙 问候

【问题讨论】:

标签: python review-board


【解决方案1】:

从您的输出看来,easy_install 正在尝试使用需要一些 cygwin 部件的选项来构建 mercurial。如果您使用的是 mingw gcc,您可能需要查看 https://www.mercurial-scm.org/wiki/BuildingOnWindows 以获取有关如何在 Windows 中构建的说明。

您使用 1.8.1 有什么原因吗?最新版本是 2.1.2。

四处搜索,Compiling with cython and mingw produces gcc: error: unrecognized command line option '-mno-cygwin' 也可能对您有所帮助。

【讨论】:

    【解决方案2】:

    https://www.mercurial-scm.org/downloads 也有适用于 Windows 的 exe 和 msi 安装程序。

    在我看来,TortoiseXXX 改变了人们对包装背后的想法。在使用 TortoiseCVS 时,我很难向同事解释如何正确使用 CVS。

    题外话:为了你自己的其他目的,也可以试试 Git (http://git-scm.com/) 这个想法非常相似。我猜 Git 会在统计上获胜。

    msysgit (Windows) 不错,功能与原来的 Linux 相当,包含的 Git Gui 和 gitk 可能看起来很奇怪(Tcl/Tk),但它们非常适合基本的 Git 操作。

    【讨论】:

      猜你喜欢
      • 2018-01-31
      • 2014-12-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-04-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多