3

I want to import some .so files in my python code which is using bazel. For this i have to set LD_LIBRARY_PATH before running the program other wise I am getting an error

ImportError: libsquishrunnerlib.so: cannot open shared object file: No such file or directory

But I want to do this using bazel or some otherway because I don't like the idea of setting the env variable on every machine my program has to run

Frerich Raabe
  • 90,689
  • 19
  • 115
  • 207
  • Would wrapping the `bazel` invocation in a `env` command be an option for you? e.g. `env LD_LIBRARY_PATH=/some/path bazel run :main`. This way you won't need to set the variable globally for each machine. – dms Sep 04 '19 at 00:48
  • You are calling squishrunner from Bazel, and want LD_LIBRARY_PATH be set for squishrunner in this case? Perhaps this has been addressed in [Bazel: set runtime environment variable and configuration file location for cc_binary/cc_test](https://stackoverflow.com/questions/43944933/bazel-set-runtime-environment-variable-and-configuration-file-location-for-cc-b) already? – frog.ca Sep 09 '19 at 12:19

0 Answers0