Python中文
首页
教程
问答
标签
搜索
登录
注册
如何正确安装dulwich以使hg git在Windows上工作?
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我正在尝试在Windows上使用hg git Mercurial扩展(具体来说是Windows 7 64位)。我安装了Mercurial和Git。我已经安装了Python2.5(32位)。</p> <p>我按照<a href="http://hg-git.github.com/" rel="noreferrer">http://hg-git.github.com/</a>上的说明安装扩展。最初的easy_安装失败,因为它无法在没有Visual Studio 2003的情况下编译dulwich。</p> <p>我通过以下方式手动安装了dulwich:</p> <ul> <li>git克隆git://git.samba.org/jelmer/dulwich.git</li> <li>德威治</li> <li>c: \Python25\python setup.py—纯安装</li> </ul> <p>现在,当我运行easy_install hg git时,它成功了(因为满足了dulwich依赖关系)。</p> <p>在我的C:\Users\username\Mercurial.In I中,我有:</p> <pre><code>[extensions] hgext.bookmarks = hggit = </code></pre> <p>当我在命令提示符下键入'hg'时,我看到: “***导入扩展hggit失败:没有名为hggit的模块”</p> <p>在我的c:\ Python25文件夹下,我看到的对hggit的唯一引用是<code>Lib\site-packages\hg_git-0.2.1-py2.5.egg</code>。这是应该提取到某处,还是应该按原样工作?</p> <p>由于失败,我尝试了hg git页面中的“更多相关”指令,建议克隆git://github.com/schacon/hg-git.git并引用Mercurial配置中的路径。我克隆了repo,并将扩展文件更改为:</p> <pre><code>[extensions] hgext.bookmarks = hggit = c:\code\hg-git\hggit </code></pre> <p>现在,当我运行hg时,我看到:**failed to import extension hg git from c:\ code\hg git\hggit:No module named dulwich.errors。</p> <p>好的,这就告诉我它现在正在查找hg git,因为我可以在hggit\hggit\git\handler.py中看到它调用的</p> <pre><code>from dulwich.errors import HangupException </code></pre> <p>这使我认为德威奇没有正确安装,或没有在路径上。</p> <p><strong>更新:</strong></p> <p>从Python命令行:</p> <pre><code>import dulwich </code></pre> <p>产生<code>Import Error: No module named dulwich</code></p> <p>但是,在C:\ Python25\Lib\site包下,我确实有一个dulwich-0.5.0-py2.5.egg文件夹,它似乎已填充。这是由上述步骤创建的。有没有一个额外的步骤让它成为Python“路径”的一部分?</p> <p>从Python命令行(如其中一个答案中建议的那样):</p> <pre><code>import pkg_resources pkg_resources.require('dulwich') </code></pre> <p>产量<code>[dulwich 0.5.0 (c:\python25\lib\site-packages\dulwich-0.5.0-py2.5.egg)]</code></p> <p>那这告诉我什么?导入dulwich失败了,但显然pkg_resources可以找到它。我能用这些信息做什么?</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>如果你可以安装龟,它包括德威治和其他要求。</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
如何在python中从数据帧列中删除分类值?
1 回答
如何在python中从数据帧列表中删除引号
4 回答
如何在python中从数据帧创建列表
4 回答
如何在Python中从数据帧创建嵌套的JSON
10 回答
如何在Python中从数据帧显示wordcloud
8 回答
如何在Python中从数据帧的时间戳中删除字符
1 回答
如何在Python中从数据帧绘制简单绘图?
6 回答
如何在python中从数据帧行提取具有特定长度的范围?
2 回答
如何在python中从数据帧设置dict中的值
5 回答
如何在Python中从数据库中获得一个结果
2 回答
如何在python中从数据框中绘制分类条形图
6 回答
如何在Python中从数据框中选择特定细节?
9 回答
如何在python中从数据集中删除unicode
1 回答
如何在python中从数据集中删除某些数值?
8 回答
如何在python中从数据集中选择行
9 回答
如何在Python中从数组中删除元素
1 回答
如何在python中从数组中删除单个倒逗号?
7 回答
如何在python中从数组中删除对象?
2 回答
如何在python中从数组中删除引号
8 回答
如何在python中从数组中删除所有最小值
1 回答