# Running Python Perimeter Test - Not working

**URL:** <https://community.zymbit.com/t/running-python-perimeter-test-not-working/690>\
**Category:** ZYMKEY4\
**Created:** [November 20, 2019, 6:12am UTC](https://community.zymbit.com/t/running-python-perimeter-test-not-working/690 "2019-11-20T06:12:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cjh39](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@cjh39](https://community.zymbit.com/u/cjh39)\
**Post date:** [November 20, 2019, 6:12am UTC](https://community.zymbit.com/t/running-python-perimeter-test-not-working/690/1 "2019-11-20T06:12:09Z")

</div>

The following wont run, how do I fix the errors at the bottom ? I’m trying to test the perimeter dectection.

cat testz.py  
import zymkey  
import time

zymkey.client.clear\_perimeter\_detect\_info()  
while True:  
print(zymkey.client.get\_perimeter\_detect\_info())  
time.sleep(1)

* * *

sudo pip install zymkey  
Requirement already satisfied: zymkey in /usr/local/lib/python2.7/dist-packages  
Requirement already satisfied: cmdline\>=0.1.8 in /usr/local/lib/python2.7/dist-packages (from zymkey)  
Requirement already satisfied: sh\>=1.11 in /usr/local/lib/python2.7/dist-packages (from zymkey)  
Requirement already satisfied: PyYAML\>=3 in /usr/local/lib/python2.7/dist-packages (from cmdline\>=0.1.8-\>zymkey)

* * *

python testz.py  
Traceback (most recent call last):  
File “testz.py”, line 1, in   
import zymkey  
File “/usr/local/lib/python2.7/dist-packages/zymkey/ **init**.py”, line 3, in   
from .module import Zymkey  
File “/usr/local/lib/python2.7/dist-packages/zymkey/module.py”, line 50, in   
raise ZymkeyLibraryError(‘unable to find {}, checked {}’.format(os.path.basename(ZYMKEY\_LIBRARY\_PATH), prefixes))  
zymkey.exceptions.ZymkeyLibraryError: unable to find libzk\_app\_utils.so, checked [’/usr/lib/python2.7/dist-packages/usr/local/lib’, ‘/usr/local/lib’]

---

<div class="post-metadata">

**Author:** ![Bob\_of\_Zymbit](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@Bob\_of\_Zymbit](https://community.zymbit.com/u/Bob_of_Zymbit)\
**Post date:** [November 20, 2019, 5:38pm UTC](https://community.zymbit.com/t/running-python-perimeter-test-not-working/690/2 "2019-11-20T17:38:40Z")

</div>

“zymkey” is an old deprecated library. The new library is called “zku”.

You must uninstall “zymkey” and install “zku” for things to work. BTW, if you had installed using our installer script, zku would have automatically installed. Any reason for not using the installer script?

---

<div class="post-metadata">

**Author:** ![cjh39](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@cjh39](https://community.zymbit.com/u/cjh39)\
**Post date:** [November 20, 2019, 6:08pm UTC](https://community.zymbit.com/t/running-python-perimeter-test-not-working/690/3 "2019-11-20T18:08:15Z")

</div>

I did use the install script about2 months ago. The example I found for testing the perimeter didn’t reference zku

Do you have an example zku test script for the perimeter ? I’m thinking it will work

Thanks

---

<div class="post-metadata">

**Author:** ![Bob\_of\_Zymbit](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@Bob\_of\_Zymbit](https://community.zymbit.com/u/Bob_of_Zymbit)\
**Post date:** [November 20, 2019, 6:24pm UTC](https://community.zymbit.com/t/running-python-perimeter-test-not-working/690/4 "2019-11-20T18:24:35Z")

</div>

The API is the same in zku.

---

<div class="post-metadata">

**Author:** ![cjh39](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@cjh39](https://community.zymbit.com/u/cjh39)\
**Post date:** [November 20, 2019, 7:35pm UTC](https://community.zymbit.com/t/running-python-perimeter-test-not-working/690/5 "2019-11-20T19:35:17Z")

</div>

are There any test programs for the perimeter defence ?
