Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
1663 Discussions

oneapi/pytorch import error when importing torch - GLIBC_2.28 not found

mike02
Novice
733 Views

Hello

 

Recently I encounter this error when importing torch in my python code. This is a simple repro of the error

~$ ipython
Python 3.9.16 (main, Jun 15 2023, 02:33:25)

In [1]: import torch
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[1], line 1
----> 1 import torch

File /glob/development-tools/versions/oneapi/2023.2.0.1/oneapi/pytorch/2.0.1.0/lib/python3.9/site-packages/torch/__init__.py:229
--> 229     from torch._C import *  # noqa: F403


ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /glob/development-tools/versions/oneapi/2023.2.0.1/oneapi/pytorch/2.0.1.0/lib/python3.9/site-packages/torch/lib/libtorch_cpu.so)

 

Checking the version of libc.so.6, it appears I have Ver 2.27 . 

ls -la /lib/x86_64-linux-gnu/libc.so.6

lrwxrwxrwx 1 root root 12 Apr 16 2018 /lib/x86_64-linux-gnu/libc.so.6 -> libc-2.27.so


Is it possible to upgrade the version?

 

Thanks

0 Kudos
2 Replies
mike02
Novice
729 Views

Sorry for the false alarm. I experience the error from the login shell. However if I create  an interactive  cloud shell then the issue goes away since the libraries are up to date.

 

u192355@s019-n020:~$ ls -la /lib/x86_64-linux-gnu/libc.so.6

lrwxrwxrwx 1 root root 12 Apr 6 2022 /lib/x86_64-linux-gnu/libc.so.6 -> libc-2.31.so

 

So my issue is resolved and this can be closed. I apologize for the extra noise

 

 

 

0 Kudos
VaradJ_Intel
Moderator
700 Views

Hi,

 

Good day to you.

 

Thanks for posting in Intel Communities.

 

Glad to know that your issue is resolved.

 

If you need any additional information, please post a new question as this thread will no longer be monitored by Intel

 

Thank You!

 

Regards 

Varad

 

0 Kudos
Reply