uber/neuropod

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

mincomp opened this issue · 1 comments

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

  • Neuropod Version 0.3.0 rc1
  • OS (Linux, macOS): Debian
  • Language (Python, C++, Go bindings): Python
  • Python version: 2.7.16
  1. Matching local environment with Python 2.7.18 fixes this problem.
  2. Use Python isolated environment fixes this problem