如何获取 core-plot 的存储库
我无法获取核心图的存储库。 我正在做的是在终端中输入以下内容:
hg clone https://core-plot.googlecode.com/hg/ core-plot
这就是我得到的:
Traceback (most recent call last): File "/usr/local/bin/hg", line 25, in mercurial.util.set_binary(fp) File "/Library/Python/2.5/site-packages/mercurial/demandimport.py", line 75, in __getattribute__ self._load() File "/Library/Python/2.5/site-packages/mercurial/demandimport.py", line 47, in _load mod = _origimport(head, globals, locals) File "/Library/Python/2.5/site-packages/mercurial/util.py", line 93, in _encoding = locale.getlocale()[1] File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/locale.py", line 460, in getlocale return _parse_localename(localename) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/locale.py", line 373, in _parse_localename raise ValueError, 'unknown locale: %s' % localename ValueError: unknown locale: UTF-8
我似乎无法安装它。 请指导我如何安装存储库。
I am not able to get the repository for core-plot. What I am doing is that I am typing this in the terminal:
hg clone https://core-plot.googlecode.com/hg/ core-plot
and this is what I get:
Traceback (most recent call last): File "/usr/local/bin/hg", line 25, in mercurial.util.set_binary(fp) File "/Library/Python/2.5/site-packages/mercurial/demandimport.py", line 75, in __getattribute__ self._load() File "/Library/Python/2.5/site-packages/mercurial/demandimport.py", line 47, in _load mod = _origimport(head, globals, locals) File "/Library/Python/2.5/site-packages/mercurial/util.py", line 93, in _encoding = locale.getlocale()[1] File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/locale.py", line 460, in getlocale return _parse_localename(localename) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/locale.py", line 373, in _parse_localename raise ValueError, 'unknown locale: %s' % localename ValueError: unknown locale: UTF-8
I can't seem to get it to install. Please give me guidance on how to install the repository.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您的计算机上安装了 Mercurial 吗? 如果没有,您可以在此处下载安装程序:http://mercurial.berkwood.com/
Have you installed Mercurial on your computer? If not, you can download an installer here: http://mercurial.berkwood.com/
您的区域设置似乎有问题。 你用的是豹子吗? 如果是这样,请检查您的终端首选项。 在终端首选项中,打开“设置”窗格,然后单击“高级”选项卡。 “字符编码”菜单应设置为“Unicode (UTF-8)”。 还要确保选中“启动时设置 LANG 变量”。
您可以通过打开终端并输入
echo $LANG
来检查您的区域设置。 我的返回en_US.UTF-8
(美国英语,UTF-8)。 不确定您的首选语言是什么,但应该是.UTF-8
- 确保它以UTF-8
结尾。It looks like you're having a problem with your locale. Are you using Leopard? If so, check your Terminal preferences. In the Terminal prefs, open up the Settings pane, and click the Advanced tab. The "Character Encoding" menu should be set to "Unicode (UTF-8)". Also make sure that "Set LANG variable on startup" is checked.
You can check your locale setting by opening up the Terminal and typing
echo $LANG
. Mine returnsen_US.UTF-8
(US English, UTF-8). Not sure what your preferred language is, but it should be<langcode>.UTF-8
-- make sure it ends withUTF-8
.该存储库工作得很好:
所以我怀疑你的问题是
hg
不在你的路径中,或者你还没有安装 Mercurial。 您应该获取安装程序的副本,或通过包管理系统(MacPorts、Apt、YUM 等)进行安装.)The repository works perfectly fine:
So I suspect your problem is that
hg
isn't in your path, or you've not installed Mercurial. You should grab a copy of the installer, or install via your package management system (MacPorts, Apt, YUM etc.)在我看来,你的 Python 安装有问题。 但是,由于您正在尝试让 Mercurial 正常工作,请通过正确的渠道联系 Mercurial 团队。 使用
这样做意味着更多的人看到你的问题,并且希望使用 Mac 的人可以帮助你(我使用的是 Debian,不知道 Apple 对你的 Python 安装做了什么......)。
It looks to me like you have a broken Python installation. However, since you're trying to get Mercurial working, please contact the Mercurial team through the correct channels. Use the
Doing so means that many more people see your problem and hopefully there will be someone who is using Mac who can help you (I'm using Debian and don't know what Apple has done to your Python installation...).
LANG 可以被 HGENCODING 覆盖。 如果“echo $HGENCODING”产生“UTF-8”,那就是你的罪魁祸首。 取消设置或将其设置为 en_US.UTF-8 (或您喜欢的任何语言,但应以 .UTF-8 结尾)。 如果您不需要非 ASCII 字符,或者只是作为测试,您也可以尝试将 HGENCODING 或 LANG 设置为“C”。
LANG can be overridden by HGENCODING. If "echo $HGENCODING" produces "UTF-8" that's your culprit. Unset it or set it to en_US.UTF-8 (or whatever language you prefer, but it should end in .UTF-8). You could also try setting HGENCODING or LANG to "C" if you have no need for non-ascii characters, or just as a test.