2011-07-19 41 views
13

看來最新版本只針對2.6。如何在python 2.7下安裝heapy?

我正面臨着ImportError: DLL load failed: The specified module could not be found.,找不到任何解決方案,有人知道嗎?

是否有任何其他內存分析器可用於Python 2.7?

錯誤回溯:

>>> import guppy 
>>> from guppy import hpy 
>>> h = hpy() 

Traceback (most recent call last): 
    File "<pyshell#3>", line 1, in <module> 
    h = hpy() 
    File "D:\program files\Python2.7\lib\site-packages\guppy\__init__.py", line 37, in hpy 
    return r.guppy.heapy.Use 
    File "D:\program files\Python2.7\lib\site-packages\guppy\etc\Glue.py", line 45, in __getattr__ 
    return self._share.getattr(self, name) 
    File "D:\program files\Python2.7\lib\site-packages\guppy\etc\Glue.py", line 195, in getattr 
    d = self.getattr2(inter, cache, owner, name) 
    File "D:\program files\Python2.7\lib\site-packages\guppy\etc\Glue.py", line 213, in getattr2 
    x = self.getattr_package(inter, name) 
    File "D:\program files\Python2.7\lib\site-packages\guppy\etc\Glue.py", line 261, in getattr_package 
    x = self.makeModule(x, name) 
    File "D:\program files\Python2.7\lib\site-packages\guppy\etc\Glue.py", line 321, in makeModule 
    return Share(module, self, module.__name__, Clamp) 
    File "D:\program files\Python2.7\lib\site-packages\guppy\etc\Glue.py", line 184, in __init__ 
    getattr(inter, name) 
    File "D:\program files\Python2.7\lib\site-packages\guppy\etc\Glue.py", line 45, in __getattr__ 
    return self._share.getattr(self, name) 
    File "D:\program files\Python2.7\lib\site-packages\guppy\etc\Glue.py", line 195, in getattr 
    d = self.getattr2(inter, cache, owner, name) 
    File "D:\program files\Python2.7\lib\site-packages\guppy\etc\Glue.py", line 215, in getattr2 
    x = self.getattr3(inter, name) 
    File "D:\program files\Python2.7\lib\site-packages\guppy\etc\Glue.py", line 283, in getattr3 
    pa = getattr(pa, at) 
    File "D:\program files\Python2.7\lib\site-packages\guppy\etc\Glue.py", line 45, in __getattr__ 
    return self._share.getattr(self, name) 
    File "D:\program files\Python2.7\lib\site-packages\guppy\etc\Glue.py", line 195, in getattr 
    d = self.getattr2(inter, cache, owner, name) 
    File "D:\program files\Python2.7\lib\site-packages\guppy\etc\Glue.py", line 213, in getattr2 
    x = self.getattr_package(inter, name) 
    File "D:\program files\Python2.7\lib\site-packages\guppy\etc\Glue.py", line 250, in getattr_package 
    x = __import__(self.makeName(name), globals(), locals()) 
    File "D:\program files\Python2.7\lib\site-packages\guppy\heapy\View.py", line 555, in <module> 
    prime_builtin_types() 
    File "D:\program files\Python2.7\lib\site-packages\guppy\heapy\View.py", line 538, in prime_builtin_types 
    import guppy.heapy.heapyc 
ImportError: DLL load failed: The specified module could not be found. 

回答

15

當我嘗試從文件夾所在的文件夾中啓動python時,我遇到了同樣的錯誤。但是出於這個目錄,我在實例化hpy時遇到了問題。最後,我從後備箱中安裝它得到heapy上python2.7工作

pip install https://guppy-pe.svn.sourceforge.net/svnroot/guppy-pe/trunk/guppy 
0

看起來可能只是從目錄中缺少所需的DLL - 你可以嘗試從2.6目錄複製到適當的路徑。雖然沒有保證。

0
  1. https://pypi.python.org/pypi/guppy/0.1.10下載源代碼(或您需要哪個版本過)
  2. 提取tar文件:焦油ZXF [你的孔雀魚tar文件]
  3. 進入文件夾:cd guppy- [version]
  4. 注意setup.py文件。運行安裝程序:sudo python setup.py install

Guppy已安裝。