pytorch / xla

Enabling PyTorch on XLA Devices (e.g. Google TPU)
https://pytorch.org/xla
Other
2.44k stars 452 forks source link

dear teachers, i can connect the internet, but i can not download it the torch_xla #7326

Open zhangwaer opened 2 months ago

zhangwaer commented 2 months ago

pip install torch_xla[tpu]~=2.3.0 -f https://storage.googleapis.com/libtpu-releases/index.html

ERROR: Could not find a version that satisfies the requirement torch_xla~=2.3.0 (from versions: none) ERROR: No matching distribution found for torch_xla~=2.3.0

JackCaoG commented 2 months ago

what's the python version you used? We don't support python 3.12 now for example.

huzama commented 2 months ago

@zhangwaer I encountered a similar issue when using the zsh shell during installation. However, everything worked perfectly when I switched to the bash shell. I'm not sure why this happens, but if you’re experiencing problems with zsh, try using bash instead.

zhangwaer commented 2 months ago

@zhangwaer I encountered a similar issue when using the zsh shell during installation. However, everything worked perfectly when I switched to the bash shell. I'm not sure why this happens, but if you’re experiencing problems with zsh, try using bash instead. thank you very much!! after i use bash, it report the same error. ERROR: Could not find a version that satisfies the requirement torch_xla[tpu]~=2.3.0 (from versions: none) ERROR: No matching distribution found for torch_xla[tpu]~=2.3.0

zhangwaer commented 2 months ago

what's the python version you used? We don't support python 3.12 now for example.

thank you very much!! my python version is 3.10.14, ubuntu18.04. Are there alternative approaches to address this issue? thank you very much!!

JackCaoG commented 2 months ago

Can you try update the pip, 3.10 should be supported

pip install --upgrade pip
miladm commented 2 months ago

Are you able to download the whl yet? If not, are you able to download the whl with wget <url-to-a-recent-whl>, and then pip install separately?

For reference, my linux machine: Ubuntu 22.04.3; not sure if older versions would cause problems though. Your python version should be fine.

zhangwaer commented 2 months ago

Can you try update the pip, 3.10 should be supported

pip install --upgrade pip

thank you very much, but my pip is 24.1, which is the newst, i still can not download it

zhangwaer commented 2 months ago

Can you try update the pip, 3.10 should be supported

pip install --upgrade pip

thank you very much, but my pip is 24.1, which is the newst, i still can not download it

i successfully download the whl, but it report as follows, i have installed the glibc_2.29: Traceback (most recent call last): File "", line 1, in File "/jty/zhangwang/miniconda3/envs/sf/lib/python3.10/site-packages/torch_xla/init.py", line 7, in import _XLAC ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /jty/zhangwang/miniconda3/envs/sf/lib/python3.10/site-packages/_XLAC.cpython-310-x86_64-linux-gnu.so)

ManfeiBai commented 2 months ago

Hi, @zhangwaer, how do you installed cmake?

if you tried conda install cmake, would you mind try:

conda uninstall cmake
pip install cmake
JackCaoG commented 2 months ago

I think default glibc version in 18.04 is 2.27, you would need a newer glibc version. You could try to update it https://stackoverflow.com/questions/72513993/how-to-install-glibc-2-29-or-higher-in-ubuntu-18-04 but it is generally dangerous. Maybe try use one of the dockers we build in https://github.com/pytorch/xla#docker

zhangwaer commented 2 months ago

Are you able to download the whl yet? If not, are you able to download the whl with wget <url-to-a-recent-whl>, and then pip install separately?

For reference, my linux machine: Ubuntu 22.04.3; not sure if older versions would cause problems though. Your python version should be fine.

thank you very much, i succefully downloaded torch_xla-2.3.0-cp39-cp39-manylinux_2_28_x86_64.whl, but my GLIBC is 2.27, so xla2.3.0 is not supported, but i have no root power, so it become difficult. can i install torch_xla 2.3.0 with glibc_2.27

zhangwaer commented 2 months ago

I think default glibc version in 18.04 is 2.27, you would need a newer glibc version. You could try to update it https://stackoverflow.com/questions/72513993/how-to-install-glibc-2-29-or-higher-in-ubuntu-18-04 but it is generally dangerous. Maybe try use one of the dockers we build in https://github.com/pytorch/xla#docker

thank you very much, i succefully downloaded torch_xla-2.3.0-cp39-cp39-manylinux_2_28_x86_64.whl, but my GLIBC is 2.27, so xla2.3.0 is not supported, but i have no root power, so it become difficult. can i install torch_xla 2.3.0 with glibc_2.27

zhangwaer commented 2 months ago

Hi, @zhangwaer, how do you installed cmake?

if you tried conda install cmake, would you mind try:

conda uninstall cmake
pip install cmake

thank you very much, i succefully downloaded torch_xla-2.3.0-cp39-cp39-manylinux_2_28_x86_64.whl, but my GLIBC is 2.27, so xla2.3.0 is not supported, but i have no root power, so it become difficult. can i install torch_xla 2.3.0 with glibc_2.27

JackCaoG commented 2 months ago

Try to run things in a docker, we have instructions in https://github.com/pytorch/xla#docker. I think these dockers come with pytorch and torch_xla preinstalled.

zhangwaer commented 2 months ago

Try to run things in a docker, we have instructions in https://github.com/pytorch/xla#docker. I think these dockers come with pytorch and torch_xla preinstalled.

thanks for your teaching, but i have no root power, so i cannot use docker, is there any wayto install torch_xla 2.3.0 with glibc_2.27? or can i change a glibc version that suitable for glibc2.27? thank you very much!!

ManfeiBai commented 2 months ago

Try to run things in a docker, we have instructions in https://github.com/pytorch/xla#docker. I think these dockers come with pytorch and torch_xla preinstalled.

thanks for your teaching, but i have no root power, so i cannot use docker, is there any wayto install torch_xla 2.3.0 with glibc_2.27? or can i change a glibc version that suitable for glibc2.27? thank you very much!!

thanks for sharing, A newer glibc might help to match.

how do we installed glibc_2.27? Please feel free to share any log for confirming

In my env, I would gain glibc when I install cmake; and conda install cmake would gain older glibc, but pip install cmake would gain newer glibc, so I would suggest to try pip install cmake if we haven't try

ManfeiBai commented 2 weeks ago

Hi, @zhangwaer, thanks for investigation, do we still blocked by this issue?