[英]Error loading Python lib '/tmp/_MEItueAuk/libpython3.7m.so.1.0': dlopen: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found
[英]Cannot import PyTorch/XLA for using TPU in CoLab with ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found
我想使用 TPU 在 Google Colab 上運行一個 PyTorch 程序,我使用以下代碼在我的 CoLab 筆記本中安裝了 PyTorch/XLA:
!pip install cloud-tpu-client==0.10 torch==1.12.0 https://storage.googleapis.com/tpu-pytorch/wheels/tpuvm/torch_xla-1.12-cp38-cp38-linux_x86_64.whl
然后,我通過import torch
成功導入了 pytorch 。
但是,當我嘗試使用import torch_xla
時,我收到以下錯誤消息:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-4-7fe098b5b807> in <module>
----> 1 import torch_xla
/usr/local/lib/python3.8/dist-packages/torch_xla/__init__.py in <module>
99 from ._patched_functions import _apply_patches
100 from .version import __version__
--> 101 import _XLAC
102
103
ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /usr/local/lib/python3.8/dist-packages/torch_xla/lib/libxla_computation_client.so)
---------------------------------------------------------------------------
Python的版本是Python 3.8.15。
我認為也許將 Python 版本降級到 Python 3.7 可能會有所幫助,但是有沒有不需要降級 Python 版本的解決方案?
https://storage.googleapis.com/tpu-pytorch/wheels/tpuvm/torch_xla-1.12-cp38-cp38-linux_x86_64.whl
看起來不像正確的 colab 輪。
如果你打算在 TPU 上運行 colab,你可以嘗試命令.pip install cloud-tpu-client==0.10 torch==1.13:0 https.//storage.googleapis.com/tpu-pytorch/wheels/colab/torch_xla-1.13-cp38-cp38-linux_x86_64.whl
代替?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.