C3W2 - framework not found error

sagemaker.image_uris.retrieve() returns an error with if I provide the suggested ‘PyTorch’ framework as an input argument

FileNotFoundError: [Errno 2] No such file or directory: ‘/opt/conda/lib/python3.7/site-packages/sagemaker/image_uri_config/PyTorch.json’

Could you please advise me how to fix this issue? I couldn’t find anything helpful in the official image_uris documentation Image URIs — sagemaker 2.146.0 documentation.


Never mind, I checked the referenced directory

%ls /opt/conda/lib/python3.7/site-packages/sagemaker/image_uri_config/

and the problem was simply that the file name is written in lowercase letters.

1 Like

Thanks, I had the same problem. Based on your solution I just copied the file under the required name:

%cp /opt/conda/lib/python3.7/site-packages/sagemaker/image_uri_config/pytorch.json /opt/conda/lib/python3.7/site-packages/sagemaker/image_uri_config/PyTorch.json

Hi Guys,

I am having the same problem.
The package installation runs with minor warnings but no directories available.

sagemaker directory is not there.

sagemaker-user@studio$ ls /opt/conda/lib/python3.7/site-packages