我用 Easy_install 安装了 Mercurial,现在我得到“没有名为‘hg’的脚本”
我在(32 位)Ubuntu 9.10 上安装了 Mercurial,使用:
sudo easy_install mercurial
它安装了 Mercurial 1.7.5。
我后来了解到,使用这种安装方式是 Mercurial 团队谴责的,尽管原因如下它不应该工作不清楚。
当我运行命令 hg
时,它响应:
Traceback (most recent call last):
File "/usr/local/bin/hg", line 5, in <module>
pkg_resources.run_script('mercurial==1.7.5', 'hg')
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 448, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1160, in run_script
raise ResolutionError("No script named %r" % script_name)
pkg_resources.ResolutionError: No script named 'hg'
我该如何解决这个问题?如何轻松_卸载安装它?
注意:我注意到 sudo hg 有效。
I installed Mercurial on (32-bit) Ubuntu 9.10, using:
sudo easy_install mercurial
It installed Mercurial 1.7.5.
I have since learned that using this way of installing is denounced by the Mercurial Team, although the reasons why it shouldn't work are not clear.
When I ran the command hg
it responded:
Traceback (most recent call last):
File "/usr/local/bin/hg", line 5, in <module>
pkg_resources.run_script('mercurial==1.7.5', 'hg')
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 448, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1160, in run_script
raise ResolutionError("No script named %r" % script_name)
pkg_resources.ResolutionError: No script named 'hg'
How do I fix this? How do I easy_uninstall it?
Note: I have noticed sudo hg
works.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
转至 /usr/local/lib/python2.6/dist-packages (或 Python 安装的相应目录)。
输入
ls -l
,您将找到类似这样的条目。如果您没有以 root 身份登录,则无权访问该内容。尝试:
这为您提供了访问权限,并且足以让我的事情重新开始。
我仍然不知道如何卸载原来造成的混乱。
Go to /usr/local/lib/python2.6/dist-packages (or the appropriate directory for your Python install).
Type
ls -l
and you will find an entry something like so.You don't have access to that if you are not logged in as root. Try:
That gives you access and was enough to get things going again for me.
I still don't know how to uninstall the original mess that was made.