[ISSUE] C3W1: problem with pytorch 1.6

Issue encountered running cell [40]

CloudWatch Failure Reason: AlgorithmError

CloudWatch Log:
subprocess.CalledProcessError: Command ‘[’/miniconda3/bin/python3’, ‘-m’, ‘conda’, ‘install’, ‘-c’, ‘pytorch’, ‘pytorch==1.6.0’, ‘-y’]’ returned non-zero exit status 1.

Hi @jimmy780,

Do you need help with this still ?

Best,
Mubsi

Hi - cannot get this working with DataScience 3.0 image.

# please ignore warning messages during the installation
!pip install --disable-pip-version-check -q sagemaker==2.35.0
!conda install -q -y pytorch==1.6.0 -c pytorch
!pip install --disable-pip-version-check -q transformers==3.5.1

Here is the error with DataScience 3.0 kernel

Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Solving environment: ...working... 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                          

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - pytorch==1.6.0 -> python[version='>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0']

Your python: python=3.10.6

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

The following specifications were found to be incompatible with your system:

  - feature:/linux-64::__glibc==2.31=0
  - feature:|@/linux-64::__glibc==2.31=0

Your installed version is: 2.31

Tried with DataScience 2.0 image and ran into

DEPRECATION: pyodbc 4.0.0-unsupported has a non-standard version number. pip 23.3 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of pyodbc or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at https://github.com/pypa/pip/issues/12063

Which Image/Kernel might help with this assignment (C3W1)?

Tried changing PyTorch version to 1.9.0, 1.11.0, 1.13.0, 2.0.0 - no success

@Sashi_Kiran_Challa Are you able to solve this problem? I’m facing the same issue.

pip install protobuf==3.20.2 & also conda install pyyaml seemed to have made a difference.

Tried that, does not work.

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