Jetson nano snap7

I successfully installed the python snap7 library via

pip3 install python-snap7

I can import the snap 7 library with no problem as its installed and hives no error.

how ever when I try to connect connect to the PLC,

import snap7.client as c

snap7.exception.snap7 Exception : can’t find snap7 library. if installed,try running ldconfig

Maybe the python version. Check install the snap7 is for python2 or python3

It is for python 3 ,I have used it in Ubuntu 20 with python 3.

I check without problem. What’s you JetPack version?

python3-pip is already the newest version (9.0.1-2.3~ubuntu1.18.04.5).
The following packages were automatically installed and are no longer required:
  apt-clone archdetect-deb bogl-bterm busybox-static cryptsetup-bin dpkg-repack gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 grub-common kde-window-manager kinit kio kpackagetool5
  kwayland-data kwin-common kwin-data kwin-x11 libdebian-installer4 libkdecorations2-5v5 libkdecorations2private5v5 libkf5activities5 libkf5attica5 libkf5completion-data
  libkf5completion5 libkf5declarative-data libkf5declarative5 libkf5doctools5 libkf5globalaccel-data libkf5globalaccel5 libkf5globalaccelprivate5 libkf5idletime5
  libkf5jobwidgets-data libkf5jobwidgets5 libkf5kcmutils-data libkf5kcmutils5 libkf5kiocore5 libkf5kiontlm5 libkf5kiowidgets5 libkf5newstuff-data libkf5newstuff5 libkf5newstuffcore5
  libkf5package-data libkf5package5 libkf5plasma5 libkf5quickaddons5 libkf5solid5 libkf5solid5-data libkf5sonnet5-data libkf5sonnetcore5 libkf5sonnetui5 libkf5textwidgets-data
  libkf5textwidgets5 libkf5waylandclient5 libkf5waylandserver5 libkf5xmlgui-bin libkf5xmlgui-data libkf5xmlgui5 libkscreenlocker5 libkwin4-effect-builtins1 libkwineffects11
  libkwinglutils11 libkwinxrenderutils11 libqgsttools-p1 libqt5designer5 libqt5help5 libqt5multimedia5 libqt5multimedia5-plugins libqt5multimediaquick-p5 libqt5multimediawidgets5
  libqt5opengl5 libqt5positioning5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5quickwidgets5 libqt5sensors5 libqt5sql5 libqt5test5 libqt5webchannel5 libqt5webkit5
  libxcb-composite0 libxcb-cursor0 libxcb-damage0 os-prober python3-dbus.mainloop.pyqt5 python3-icu python3-pam python3-pyqt5 python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-sip
  qml-module-org-kde-kquickcontrolsaddons qml-module-qtmultimedia qml-module-qtquick2 rdate tasksel tasksel-data
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 418 not upgraded.
nvidia@nvidia-desktop:~$ pip3 install python-snap7
Collecting python-snap7
  Downloading https://files.pythonhosted.org/packages/3c/14/bba7e95a336c075fe74d69d649d46268016ccde9814fba021a15dde4c49a/python-snap7-1.1.tar.gz (43kB)
    100% |████████████████████████████████| 51kB 278kB/s
Building wheels for collected packages: python-snap7
  Running setup.py bdist_wheel for python-snap7 ... done
  Stored in directory: /home/nvidia/.cache/pip/wheels/79/72/eb/1dc8569bd4dc6472e0a6d75415ad0184ce0384c29becd0ce7d
Successfully built python-snap7
Installing collected packages: python-snap7
Successfully installed python-snap7-1.1
nvidia@nvidia-desktop:~$ pyton3
-bash: pyton3: command not found
nvidia@nvidia-desktop:~$ python3
Python 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import snap7.client as c
>>>

I was able to get to do all the above steps listed above , but when i try to run the client ,It says that

snap7.exception.snap7 Exception : can’t find snap7 library. if installed,try running ldconfig
JETPACK is 4.6.0
As mentioned in my question

Please run these commands

import snap7.client as c
c.Client()
And if it still works then let me know as i have not able to make it work

I have the same problem like @hamzashah411411. Yes, snap7 successfully installing but after the installation, when I am running the snap7.client.Client() or c.Client() commands, the snap7.exception.snap7 Exception : can’t find snap7 library. if installed,try running ldconfig error shows up.

I don’t really understand how people use snap7 on Jetson. Because there is no jetson or ARM v8 support on this site. However, I saw some videos that show snap7 works on Jetson nano.

So, can anyone tell us how to deal with this issue?

Only a specific version of the snap 7 python library works.
Once you pip install that you have to copy paste a file for snap 7 repository to the system path and then it will work.

Unfortunately (for you , not for me) I am on vacation and don’t have a nano with me otherwise I would have mentioned the exact version , file and it’s path to make it work.

Its very simple solution but I banged my head around for days for that.

For only I can only tell you that it works as I don’t even have work laptop with me for now.

GOOD LUCK!

1 Like

Looks like you need install snap7 also not just pyton-snap7
Try download the source code to install it.

https://python-snap7.readthedocs.io/en/latest/installation.html#snap7

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.