Plone:checkinterval无法导入pystone

时间:2015-06-24 12:32:59

标签: performance python-2.7 plone gil plone-4.x

我找到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事情过时了吗?

1 个答案:

答案 0 :(得分:2)

Pystone should be in your python not your Plone. To check that just find out the python you are using & test the import as below:

$ 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
>>> 

Will probably fail on your system.

Which platform are you using? This fedora user's problem is similar to yours & is simply solved by yum install python-test. Hopefully it's that easy for you?

If you installed Plone using the Universal Installer it should have built you a python that (I think) would have dependencies like this included....