uber / neuropod

A uniform interface to run deep learning models from multiple frameworks
https://neuropod.ai
Apache License 2.0
937 stars 77 forks source link

Python built-in libraries can't be found when bundled python model and external environment have different versions #482

Open mincomp opened 3 years ago

mincomp commented 3 years ago

Bug

Seeing

03/08/21 19:17:16.834300: D neuropod/internal/backend_registration.cc:223] [thread 76029, process 76029] Registering backend PythonBridge with type python and version 2.7.18
LoadNeuropod modelPath = ./example/string_python/neuropod failed: ImportError: No module named time

at pip_utils.py(20), when loading Neuropod Python model

To Reproduce

Steps to reproduce the behavior:

  1. Use Python 2.7.16
  2. Build Neuropod with Python 2.7 as Neuropod Python backend version
  3. Create and load a Neuropod Python model

Environment

mincomp commented 3 years ago
  1. Matching local environment with Python 2.7.18 fixes this problem.
  2. Use Python isolated environment fixes this problem