Error when trying Ball Segmentation Training Example

After successfully trying out the two main Isaac SIM examples I decided to try the Ball Segmentation example as described here.

https://docs.nvidia.com/isaac/isaac/packages/ml/ml.html#ball-seg-chapter

But, I’m getting a “ModuleNotFoundError: No module named ‘scipy’” error for Step 5.

Here is a complete log of the command execution. Note - This is when I tried it a second time after confirming that scipy was installed by going into python (from the same environment), and simply trying import scipy. That worked just fine.

(tf-gpu) mechamj@VisioComputer:~/isaac_sdk-2019.1-17919$ bazel run apps/samples/ball_segmentation/training
WARNING: /home/mechamj/isaac_sdk-2019.1-17919/packages/viewers/BUILD:14:12: in srcs attribute of cc_binary rule //packages/viewers:libviewers_module.so: please do not import ‘//packages_x86_64/viewers:libviewers_module.so’ directly. You should either move the file to this package or depend on an appropriate rule there
WARNING: /home/mechamj/isaac_sdk-2019.1-17919/packages/perception/BUILD:34:12: in srcs attribute of cc_binary rule //packages/perception:libperception_module.so: please do not import ‘//packages_x86_64/perception:libperception_module.so’ directly. You should either move the file to this package or depend on an appropriate rule there
INFO: Analysed target //apps/samples/ball_segmentation:training (1 packages loaded, 2 targets configured).
INFO: Found 1 target…
Target //apps/samples/ball_segmentation:training up-to-date:
bazel-bin/apps/samples/ball_segmentation/training
INFO: Elapsed time: 109.560s, Critical Path: 48.67s, Remote (0.00% of the time): [queue: 0.00%, setup: 0.00%, process: 0.00%]
INFO: 664 processes: 664 linux-sandbox.
INFO: Build completed successfully, 669 total actions
INFO: Build completed successfully, 669 total actions
Traceback (most recent call last):
File “/home/mechamj/.cache/bazel/_bazel_mechamj/c922fe759bc372a6bb8e809d110f9870/execroot/isaac/bazel-out/k8-opt/bin/apps/samples/ball_segmentation/training.runfiles/isaac/apps/samples/ball_segmentation/training.py”, line 19, in
import scipy
ModuleNotFoundError: No module named ‘scipy’

I decided to try it outside of the Anaconda virtual environment, and I still ran into the same issue.

Even when I went all the way back to the installing dependencies on the desktop.
https://docs.nvidia.com/isaac/isaac/doc/setup.html

So I decided to uninstall Anaconda, and to try it without that. The thought process being that Bazel was using a different python that didn’t have that module installed.

Once Anaconda was uninstalled it worked fine.

Glad you figured it out. Yes, you to let Bazel take control of the dependencies such as python.