0

I'm running Google colab in a local session on my machine. When I try and run a python script with the import of onnxruntime I get the error: ModuleNotFoundError: No module named 'onnxruntime'

I've installed both onnxruntime and onnxruntime-gpu, so the module is there and is in the environment path listings.

However if I run the following native in Google Colab:

import onnxruntime
print(onnxruntime.__version__)
print(onnxruntime.get_device())
print(onnxruntime.get_available_providers())

I get the following ouput:

1.15.1 CPU ['CPUExecutionProvider']

I do have a cuda capable GPU card, M40, and cuda installed as well as pytorch. I'm puzzled as to why when trying to run a python script I get ModuleNotFound but when running native in a Google colab cell I don't get that error. Anyone have any ideas?

Robert Crovella
  • 143,785
  • 11
  • 213
  • 257

0 Answers0