diff --git a/README.md b/README.md index f8788548..d088c0a5 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,17 @@ Alternately, the nightly version can be installed with: pip install ai-edge-torch-nightly ``` +### Update LD_LIBRARY_PATH if necessary + +Torch XLA builds a shared library, `_XLAC.so` that needs to link to the version of Python +it was built with (currently 3.10 or 3.11). In order to ensure that `import _XLAC` can succeed, +update the LD_LIBRARY_PATH to the lib directory of your Python environment: + +```bash +export LD_LIBRARY_PATH=/lib:$LD_LIBRARY_PATH +``` + + * The list of versioned releases can be seen [here](https://github.com/google-ai-edge/ai-edge-torch/releases). * The full list of PyPi releases (including nightly builds) can be seen [here](https://pypi.org/project/ai-edge-torch/#history).