Plone:checkinterval 无法导入 pystone

Plone: checkinterval can't import pystone

我找到了 the hint about using checkinterval in the Plone documentation(用于性能调整)并尝试安装它;在我的 buildout.cfg:

[buildout]
parts +=
    checkinterval

[checkinterval]
recipe = zc.recipe.egg
eggs =
    jarn.checkinterval

然而,当我在构建后尝试调用 bin/checkinterval 时,它失败了:

  File ".../eggs/jarn.checkinterval-1.0-py2.7.egg/jarn/checkinterval/checkinterval.py", line 4, in <module>
    from test import pystone
ImportError: cannot import name pystone

我查看了 jarn.checkinterval 包,没有发现 test 模块和任何需求规范。

我尝试将test添加到零件列表中,以及pip install test之类的;但是我发现的 test 包不包含字符串 pystone.

那么,我在哪里可以找到这个 pystone 实用程序,我如何集成它才能找到它?

还是这个 checkinterval 东西已经过时了?

Pystone 应该在您的 python 而不是您的 Plone 中。要检查是否只是找出您正在使用的 python 并测试导入,如下所示:

$ head -2 bin/buildout
#!/home/daniel/dev/Plone/Development/myproject/bin/python

$ /home/daniel/dev/Plone/Development/myproject/bin/python
Python 2.7.5 (default, Jul 15 2013, 18:40:50) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from test import pystone
>>> 

在您的系统上可能会失败。

您使用的是哪个平台? This fedora user's problem 与你的相似 & 简单地由 yum install python-test 解决。希望这对您来说很容易吗?

如果您使用 Universal Installer 安装了 Plone,它应该已经为您构建了一个 python(我认为)会包含这样的依赖项....