aws-neuron / aws-neuron-sdk

Powering AWS purpose-built machine learning chips. Blazing fast and cost effective, natively integrated into PyTorch and TensorFlow and integrated with your favorite AWS services
https://aws.amazon.com/machine-learning/neuron/
Other
462 stars 154 forks source link

neuronx-cc version 2.* not found with Python 3.12 #932

Open sangraamp opened 3 months ago

sangraamp commented 3 months ago

I am using a venv with Python 3.12 installed, on Amazon Linux 2. Here's the venv setup:

(venv) [ec2-user@ip-172-16-4-94 work]$ python --version
Python 3.12.2
(venv) [ec2-user@ip-172-16-4-94 work]$ pip --version
pip 24.1.2 from /home/ec2-user/work/venv/lib/python3.12/site-packages/pip (python 3.12)

Here are the OS details:

(venv) [ec2-user@ip-172-16-4-94 work]$ cat /etc/os-release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
SUPPORT_END="2025-06-30"

When I try to execute the final step mentioned here to get my setup ready to run this notebook, I get an unexpected error:

(venv) [ec2-user@ip-172-16-4-94 work]$ python -m pip install neuronx-cc==2.* torch-neuronx==1.13.* torchvision
Looking in indexes: https://pypi.org/simple, https://pip.repos.neuron.amazonaws.com
ERROR: Could not find a version that satisfies the requirement neuronx-cc==2.* (from versions: 1.0.post1)
ERROR: No matching distribution found for neuronx-cc==2.*

When I try to force it to only look for the package in https://pip.repos.neuron.amazonaws.com, this happens:

(venv) [ec2-user@ip-172-16-4-94 work]$ python -m pip install --upgrade neuronx-cc==2.* torch-neuronx==1.13.* torchvision --index-url=https://pip.repos.neuron.amazonaws.com --no-index

ERROR: Could not find a version that satisfies the requirement neuronx-cc==2.* (from versions: none)
ERROR: No matching distribution found for neuronx-cc==2.*

I am not sure if this is because the package manager on Amazon Linux 2 doesn't have any newer versions of Python after 3.8. When I tried the above thing with Python 3.8, it worked. But, since it is nearing its end of support, I would prefer to use the latest Python version available. I had successfully built Python 3.12 from source, but now, am facing the above error. Any help would be appreciated.

shebbur-aws commented 3 months ago

Hi sangraamp, Sorry, we do not support Python 3.12 yet and the support for Python 3.11 is coming in one of our upcoming releases

sangraamp commented 3 months ago

Thanks for the clarification, @shebbur-aws! In the current release, what is the latest version of python which is supposed? Based on your comment, it would be 3.10 right?

shebbur-aws commented 3 months ago

Thats correct. You can refer to the versions we support here - https://awsdocs-neuron.readthedocs-hosted.com/en/latest/release-notes/index.html#supported-python-versions-for-inf2-trn1-packages