导入 Mercurial api 时出错
有下一个问题:
有一个 django 项目,我需要在其中使用 Mercurial api。 当我执行下一步时:
from mercurial import hg,ui
我收到错误:
Exception Type: ImportError
Exception Value: cannot import name hg
Exception Location: //some.py in , line 1
Python Executable: /usr/bin/python2.6
Python Version: 2.6.6
Python Path: ['/usr/lib/python2.6', .... '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/local/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/python2.6/dist-packages/gst-0.10', '/usr/lib/pymodules/python2.6', '/usr/lib/python2.6/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.6/gtk-2.0']
放置 Mercurial 包的 PythonPath 中有 '/usr/lib/pymodules/python2.6' 。 当我将 /usr/lib/pymodules/python2.6/mercurial 添加到 PythonPath 中时,evev 并没有解决问题。
您有什么建议吗? 谢谢
Have the next problem:
There is a django project and I need use the mercurial api in it.
When I do the next:
from mercurial import hg,ui
I get error:
Exception Type: ImportError
Exception Value: cannot import name hg
Exception Location: //some.py in , line 1
Python Executable: /usr/bin/python2.6
Python Version: 2.6.6
Python Path: ['/usr/lib/python2.6', .... '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/local/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/python2.6/dist-packages/gst-0.10', '/usr/lib/pymodules/python2.6', '/usr/lib/python2.6/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.6/gtk-2.0']
there is '/usr/lib/pymodules/python2.6' in the PythonPath where mercurial package is placed.
evev when I added /usr/lib/pymodules/python2.6/mercurial into the PythonPath does not solve the problem.
Do you have any suggestion?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论