我正在使用随hcluster提供的setup.py文件,并添加了以下行:
sys.path.append("c:\\Program Files\\Python26\\Lib\\site-packages\\hcluster-0.2.0")
sys.path.append("c:\\Program Files\\Python26\\Lib\\site-packages\\hcluster-0.2.0\\hcluster")
然后使用setup.py,如下所示:
“c:\ program files \ python26 \ python.exe”“c:\ Program Files \ Python26 \ Lib \ site-packages \ hcluster-0.2.0 \ setup.py”install
我收到以下错误消息:
running install
running build
running build_py
error: package directory 'hcluster' does not exist
不知道它是否正在尝试读取或写入hcluster。
任何帮助表示赞赏
答案 0 :(得分:1)
您无需在sys.path中的site-packages中添加包。
您是否手动复制了网站包中的hcluster?这不是正确的方法。
2.1您应该在您的主目录中有站点包之外的hcluster,然后运行“python setup.py install”
2.2这将把构建后的包放入site-package目录。这是所有外部程序包在安装后默认驻留的位置。
从site-packages中删除与hcluster相关的文件夹,并按照说明2进行安装。
请阅读以下内容以了解您的错误:http://docs.python.org/install/index.html