我从http://pypi.python.org/pypi/hcluster下载 hcluster ,然后解压缩到一个文件夹,然后键入"python setup.py install"
. 似乎还可以,因为它显示:
Z:\>python setup.py install
running install
running build
running build_py
running build_ext
building '_hierarchy_wrap' extension
error: None
但我尝试“导入 hcluster”,它显示:
In [2]: import hcluster
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-2-002633efa200> in <module>()
----> 1 import hcluster
D:\Python\lib\site-packages\hcluster\__init__.py in <module>()
----> 1 import hierarchy as _h
2 import distance as _d
3 from hierarchy import *
4 from distance import *
5 from inspect import getmembers
D:\Python\lib\site-packages\hcluster\hierarchy.py in <module>()
196
197 import numpy as np
--> 198 import _hierarchy_wrap, types
199 import hcluster.distance as distance
200
ImportError: No module named _hierarchy_wrap
我是一个为 Python 模块构建、编译、安装等的新手,有人可以详细说明如何解决这个问题吗?谢谢
(我使用的是 Windows XP 和 Python 2.6.1)