Creating ROS2 Snaps with Tensorflow dependencies

Interesting! I tried you suggestion as follows:

parts:
  tensorflow-py:
    plugin: python
    python-package: [tensorflow]
    stage:
      - lib64

and unfortunately the same error came up. I tried it in different configurations with the stage keyword in the ROS2 part instead and in both and they still came with the same error.

I did however sort of learn to use --debug mode and found out that lib64 is actually a directory and not a file! According to this documentation, the stage keyword takes files and not directories. So I changed it to:

parts:
  tensorflow-py:
    plugin: python
    python-package: [tensorflow]
    stage:
      - lib64/*

And it worked! :confetti_ball: :partying_face:

I initially tried it with both the ROS2 part and the python part but it gave me an error. This method only works if you do it to just the python plugin part and NOT the ROS2 part. Thank you for your help @cjp256!

4 Likes