有人能够安装 PyWeka 吗?
我需要在 Windows 的 python 2.6 或 2.7 中安装库 PyWeka0.3dev,它说它需要 setuptools,我安装了它,但后来他们告诉我这是一个已弃用的安装库,我安装了分发,然后我下载了 PyWeka 压缩包并每次我尝试既不使用 setup.py 也不使用 easy_install 安装它(其中显示类似 no module ez_setup 的内容)。有人可以告诉我如何做到这一点吗?
I need to install in python 2.6 or 2.7 for windows the library PyWeka0.3dev, It says it requires setuptools, which I installed but then they told me it was a deprecated instalation library and I installed distribute, then I downloaded the PyWeka compressed package and each time I try to install it neither with setup.py nor with easy_install (where it says something like no module ez_setup). Can anybody give me a clue about how to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正如通过 Aardvark 向您提到的(是的,我无所不在),有问题的模块已损坏。您无法轻松安装它。这是 PyWeka 中的一个错误。
您可以从 PyPI 下载该文件, http://pypi.python.org/pypi/PyWeka/ 0.3dev,并解压它。
在文件 setup.py 中,删除以下两行:
并通过运行安装它
您需要先安装 numpy 和 NamedMatrix (与 PyWeka 具有相同的 bug)。
但是,您提到您使用的是 Windows。我强烈怀疑 PyWeka 能否在 Windows 上运行。其中有一些 Unix 特定的代码。
而且我仍然很想知道为什么作者通过从
subprocess
调用cat
来读取文件。这似乎毫无意义,并且与损坏的安装一起,足以让我远离该模块。我怀疑它的作者根本不知道他们在做什么。那,或者他们是天才。
As mentioned to you via Aardvark (yes, I am omnipresent), the module in question is broken. You can't easy_install it. It's a bug in PyWeka.
You can download the file from PyPI, http://pypi.python.org/pypi/PyWeka/0.3dev, and unpack it.
In the file setup.py, remove the following two lines:
And install it by running
You need to have installed numpy and NamedMatrix (which has the same bug as PyWeka) first.
However, you mentioned you are on Windows. I strongly doubt that PyWeka will work on Windows. There are some Unix specific code in it.
And I still really want to know why the authors are reading files by calling
cat
fromsubprocess
. That seems pretty pointless and is together with the broken install, good enough reason for me to keep far away from that module. I suspect it's authors simply have no idea what they are doing.That, or they are geniuses.
朋克/哥特式的编程方法可能有权利这样做。
为了让 C 编译部分在 Windows 上工作,您需要 (1) 拥有与用于编译您所使用的 Python 版本相同版本的 Visual Studio使用,或(2)mingw,设置起来有点棘手。
A punk/goth approach to programming probably has the right to be..
To get the C-compliation part to work on windows you either need (1) to have Visual Studio of the same version that was used to compile the python version you are using, or (2) mingw which is a bit trickier to set up.