Installing Pyro

This chapter will show how to obtain and install Pyro.


Pyro is written in 100% Python. It works on any recent operating system where a suitable Python implementation is available (2.7, 3.3 and newer). It also works with Pypy and IronPython. It will probably not work with Jython 2.7 at this time of writing. If you need this, try Pyro version 4.34 or older instead. (if you only need to write client code in Jython/Java, consider using Pyrolite - client library for Java and .NET instead!)


When Pyro is configured to use pickle, cloudpickle, dill or marshal as its serialization format, it is required to have the same major Python versions on your clients and your servers. Otherwise the different parties cannot decipher each others serialized data. This means you cannot let Python 2.x talk to Python 3.x with Pyro, when using those serializers. However it should be fine to have Python 3.3 talk to Python 3.4 for instance. The other protocols (serpent, json) don’t have this limitation!

Obtaining and installing Pyro

Debian Linux (or Debian derived distributions)
You can install via the package manager: apt install python3-pyro4 (for Python 3.x) or apt install python2-pyro4 (for Python 2.x). Please pay attention to the packaged Pyro4 version, it can be quite old if you’re not getting the package from the testing or unstable repositories.
Anaconda users can install the Pyro4 package from conda-forge using conda install -c conda-forge pyro4
pip install Pyro4 should do the trick. Pyro is available here on pypi.
Manual installation
Download the source distribution archive (Pyro4-X.YZ.tar.gz) from Pypi or Github, extract and python install. The serpent serialization library must also be installed. If you’re using a version of Python older than 3.4, the selectors2 or selectors34 backported module must also be installed to be able to use the multiplex server type.


When using Python 3.4 or older it is better to install selectors2 instead of selectors34. Pyro4’s package requirements only refer to selectors34 but Pyro will use selectors2 first if it detects it. (reason: selectors2 deals with interrupted system calls better. Python 3.5 and newer already have this built-in.)

Source is on Github: The required serpent serializer library is there as well:

Third party libraries that Pyro4 uses

serpent - required, 1.23 or newer
Should be installed automatically when you install Pyro4.
selectors34 - required on Python 3.3 or older
Should be installed automatically when you install Pyro4.
selectors2 - optional on Python 3.4 or older
Install this if you want better behavior for interrupted system calls on Python 3.4 or older.
dill - optional, 0.2.6 or newer
Install this if you want to use the dill serializer.
cloudpickle - optional, 0.4.0 or newer
Install this if you want to use the cloudpickle serializer.
msgpack-python - optional, 0.4.6 or newer
Install this if you want to use the msgpack serializer.

Stuff you get extra in the source distribution archive and not with packaged versions

If you decide to download the distribution (.tar.gz) you have a bunch of extras over simply installing the Pyro library directly. It contains:

the Sphinx/RST sources for this manual
dozens of examples that demonstrate various Pyro features (highly recommended to examine these, many paragraphs in this manual refer to relevant examples here)
the unittest suite that checks for correctness and regressions
The actual Pyro4 library’s source code (only this part is installed if you install the Pyro4 package)
and a couple of other files:
a setup script and other miscellaneous files such as the license (see Software License and Disclaimer).

If you don’t want to download anything, you can view all of this online on Github.