Any recommendation on how to install additional python modules in zato


We would like to install additional python modules for our zato-2.0.7 cluster. We use centos6 and installation is done using zato-2.0.7-stable rpm. The rpm installed zato in /opt/zato/2.0.7. Each time I install addition python module as zato user using pip, the module will install in /opt/zato/2.0.7/code/lib/python2.7/site-packages/.

May i know is there a recommended way to install additional python modules so that the module will not be affected by future upgrade and the upgraded zato will able to find the installed modules? Also is it recommended to upgrade packages provided by zato packages like “pip”. Will it break zato as a package?

I also encounter the following error when i try to install additional module with pip:
“Cannot remove entries from nonexistent file /srv/zato/2.0.7/code/eggs/easy-install.pth”

Do we use pip or easy-install for zato?



I had more or less the same question. Has been answered, see:

Regards, Jan

I encounter “Cannot remove entries from nonexistent file /srv/zato/2.0.7/code/eggs/easy-install.pth” even when using /opt/zato/current/bin/pip in the case of installing paramiko any advise out there?

I had a similar question but I had no responses (see Upgrading pyfilesystem package (zato 2.0.7 on RHEL 6.7)).

I needed either to update pyfilesystem used on zato (so I could see if my FTP bugs would stop ocurring) or use another protocol altogether. In my case, the customer said all remote access should be standarized to SFTP, so I tried to install paramiko, with the same problems as you reported.

In the end, I saw the easiest choice was to install the least conflicting version of paramiko, since my machine does not have internet access, it was impossible to make it work using buildout. I even tried using my VM to compile the versions I needed but even then, I could not make it work (latest pyfilesystem gave me an install error, like the package was not available to install, latest paramiko installed properly but did not work in the end).

My final solution was to deliver paramiko 1.18.3 (latest 1.x branch) and its dependencies (I believe it was ecdsa mainly, since pycrypto was already bundled in zato but do not trust my memory, don’t have access to the machine now) on the zato_extra_paths folder.

I would prefer to be able to use the latest one, but since no one chimed in on how to solve it in a better way, this was the best I could do on my own. I would love to have an updated official description about updating bundled (or dependencies) versions, specially in an offline environment like mine.

PS.: Remember to explicitly close your connections when using paramiko, Zato won’t be aware of them so its your responsability to avoid excess open sockets and eventually losing access to your machine (I learned this the hard way).

Hope it helps!

Sam - the solution to this interplay of pip and buildout is the command below:

$ cp /opt/zato/current/lib/python2.7/site-packages/easy-install.pth /opt/zato/current/eggs/
1 Like

Hi @rtrind - thanks for the post, I also replied to your other topic.

Aha, thank you @dsuch for what it’s worth once I installed specifically 1.18.3 paramiko, then the packages installed and I was able to use paramiko.

But, I will never the less employ what you state here in the future.