我正在使用本指南在IIS7网络服务器上安装Mercurial:http://pteradigm.com/2012/09/16/mercurial-on-iis-7-x86-or-x64/#hg_iis_python
我使用以下版本:
我已将python和python \ scripts文件夹添加到'Path'环境变量。
当我需要将hgwebdir_wsgi.py编译成DLL时,使用Administrative命令提示符我尝试编译hgwebdir_wsgi.py并收到以下错误:
C:\inetpub\wwwroot\hg>python hgwebdir_wsgi.py
Traceback (most recent call last):
File "hgwebdir_wsgi.py", line 73, in <module>
application = hgwebdir(hgweb_config)
File "C:\Python27\lib\site-packages\mercurial\hgweb\hgwebdir_mod.py", line 89,
in __init__
self.refresh()
File "C:\Python27\lib\site-packages\mercurial\hgweb\hgwebdir_mod.py", line 98,
in refresh
u = ui.ui()
File "C:\Python27\lib\site-packages\mercurial\ui.py", line 45, in __init__
for f in scmutil.rcpath():
File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 102, in _
_getattribute__
self._load()
File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 74, in _l
oad
mod = _hgextimport(_import, head, globals, locals, None, level)
File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 43, in _h
gextimport
return importfunc(name, globals, *args)
File "C:\Python27\lib\site-packages\mercurial\scmutil.py", line 290, in <modul
e>
class vfs(abstractvfs):
File "C:\Python27\lib\site-packages\mercurial\scmutil.py", line 318, in vfs
@util.propertycache
File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 102, in _
_getattribute__
self._load()
File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 74, in _l
oad
mod = _hgextimport(_import, head, globals, locals, None, level)
File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 43, in _h
gextimport
return importfunc(name, globals, *args)
File "C:\Python27\lib\site-packages\mercurial\util.py", line 27, in <module>
cachestat = platform.cachestat
File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 102, in _
_getattribute__
self._load()
File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 74, in _l
oad
mod = _hgextimport(_import, head, globals, locals, None, level)
File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 43, in _h
gextimport
return importfunc(name, globals, *args)
File "C:\Python27\lib\site-packages\mercurial\windows.py", line 36, in <module
>
posixfile.__doc__ = osutil.posixfile.__doc__
File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 102, in _
_getattribute__
self._load()
File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 74, in _l
oad
mod = _hgextimport(_import, head, globals, locals, None, level)
File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 43, in _h
gextimport
return importfunc(name, globals, *args)
ImportError: DLL load failed: %1 is not a valid Win32 application.
大多数相关问题的答案是32位与64位问题:然而,我使用了Python和Pywin的64位版本,并从源代码构建了mercurial(或者,我正在尝试)。为什么我的编译失败了?
答案 0 :(得分:0)
我无法解决此版本Mercurial的问题。最终工作的是
尽管我之前只小心安装了64位版本,但我认为在某个地方添加了一个32位版本 - 至少,这就是我所假设的,因为32位工作正好在门外。我怀疑Mercurial的旧版本是它工作的原因,但我确实改变了版本,所以我把它包含在我的答案中。
我对其他遇到此问题的人的建议:无论你的处理器是什么,都要切换到32位统一。