Binary Wheel Installation¶
We advice you to install python-snap7 using a binary wheel. The binary wheels should work on Windows 64x, OS X (intel) and Linux x64. python-snap7 is available on PyPI. You can install it by using pip:
$ pip install python-snap7
Manual Installation (not recommended)¶
If you are running an unsupported platform you need to do a bit more work. This involves two steps. First, install the snap7 library, followed by the installation of the python-snap7 package.
If you are using Ubuntu you can use the Ubuntu packages from our launchpad PPA. To install:
$ sudo add-apt-repository ppa:gijzelaar/snap7 $ sudo apt-get update $ sudo apt-get install libsnap7-1 libsnap7-dev
Download the zip file from the
Unzip the zip file, and copy
in your system PATH, for example
%systemroot%\System32\. Alternatively you can
copy the file somewhere on your file system and adjust the system PATH.
Compile from source¶
Download the latest source from the sourceforce page and do a manual compile. Download the file and run:
$ p7zip -d snap7-full-18.104.22.168z # requires the p7 program $ cd build/<platform> # where platform is unix or windows $ make -f <arch>.mk install # where arch is your architecture, for example x86_64_linux
For more information about or help with compilation please check out the documentation on the snap7 website.
Once snap7 is available in your library or system path, you can install it from the git repository or from a source tarball:
$ python ./setup.py install