Yes, you can use PyTorch/XLA with Python versions other than 3.8. However, compatibility depends on the specific version of PyTorch/XLA and the Python version you are using.
- PyTorch/XLA 2.5: This version requires Python 3.9 to 3.11 for compatibility. If you are using Python 3.12, you may encounter issues like "No matching distribution found" because wheels for PyTorch/XLA 2.5 are not available for Python 3.12[1][3].
- General PyTorch Compatibility: PyTorch itself supports a range of Python versions, including 3.8, 3.9, 3.10, and potentially newer versions depending on the PyTorch version. For example, PyTorch v2.4 supports Python 3.8 to 3.10[2].
To ensure compatibility, it's essential to check the specific requirements for the version of PyTorch/XLA you are using and ensure your Python version matches those requirements.
Citations:[1] https://stackoverflow.com/questions/79314991/why-am-i-getting-no-matching-distribution-found-for-torch-xla-2-5-0-when-inst
[2] https://www.restack.io/p/pytorch-answer-python-versions
[3] https://cloud.google.com/blog/products/ai-machine-learning/whats-new-with-pytorchxla-2-5
[4] https://awsdocs-neuron.readthedocs-hosted.com/en/latest/release-notes/torch/torch-neuronx/index.html
[5] https://pytorch.org/xla/master/torch_compile.html
[6] https://pypi.org/project/torch-xla/
[7] https://pytorch.org/xla/release/2.0/index.html
[8] https://discuss.pytorch.org/t/installing-pytorch-under-python-3-8-question-about-networkx-version/196740