Skip to content

Commit 1fad116

Browse files
talumbauchunnienc
andauthored
Update docs for dynamic loading of libpython (google-ai-edge#101)
BUG=https://b.corp.google.com/issues/322386436 Co-authored-by: Chunnien Chan <[email protected]>
1 parent e45d1d3 commit 1fad116

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,17 @@ Alternately, the nightly version can be installed with:
102102
pip install ai-edge-torch-nightly
103103
```
104104

105+
### Update LD_LIBRARY_PATH if necessary
106+
107+
Torch XLA builds a shared library, `_XLAC.so` that needs to link to the version of Python
108+
it was built with (currently 3.10 or 3.11). In order to ensure that `import _XLAC` can succeed,
109+
update the LD_LIBRARY_PATH to the lib directory of your Python environment:
110+
111+
```bash
112+
export LD_LIBRARY_PATH=<path to Python installation>/lib:$LD_LIBRARY_PATH
113+
```
114+
115+
105116
* The list of versioned releases can be seen [here](https://github.com/google-ai-edge/ai-edge-torch/releases).
106117
* The full list of PyPi releases (including nightly builds) can be seen [here](https://pypi.org/project/ai-edge-torch/#history).
107118

0 commit comments

Comments
 (0)