Problem in Pip in C3W2 lab

I run the cell with the following code:

!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

But the reply is always like this:
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 Deprecate legacy versions and version specifiers · Issue #12063 · pypa/pip · GitHub
ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
sparkmagic 0.20.4 requires nest-asyncio==1.5.5, but you have nest-asyncio 1.5.7 which is incompatible.

Then I cannot import the sagemaker or any modules related to it. Can anyone help me?

1 Like

@esanina can you look into it?

me to
ImportError: cannot import name ‘deprecated’ from ‘sagemaker.deprecations’ (/opt/conda/lib/python3.7/site-packages/sagemaker/deprecations.py)

[12]:

@Krish_Mahajan @iambenn thank you for the messages. We are investigating the issue and will provide an update as soon as possible.

@esanina Thank you for quick response. I’m facing the same issue in C3W3 lab.

I’m getting the following messages while I’m installing the same 3 libraries mentioned above in C2W1.

Error Message:

ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
distributed 2022.7.0 requires tornado<6.2,>=6.0.3, but you have tornado 6.3.2 which is incompatible.
WARNING: Running pip as the ‘root’ user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: 12. Virtual Environments and Packages — Python 3.11.4 documentation
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

error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [2 lines of output]
/bin/sh: 1: pkg-config: not found
Failed to find sentencepiece pkgconfig
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

@Kaustubh_Bhavsar @Krish_Mahajan thank you for the messages, we are investigating the issue with the AWS team. Hopefully it will be solved as soon as possible.

@esanina Is there any update? I’m not able to finish my last course and I would be charged again for the monthly subscription of the specilization.

@Krish_Mahajan sorry for a little bit of a delay. This should be resolved soon, I’ll keep you posted.

@esanina has the issue been solved? It is still impossible to launch the lab

@Roberto_Castellini thank you for the message and sorry for the inconvenience. We are working on resolving this issue. Our appologies that it takes so long. I will keep you updated and let you know as soon as the issue will be resolved.

@Krish_Mahajan @iambenn @Roberto_Castellini thank you for the messages and patience. The issue is resolved now. Please add the following code at the end of the pip installations:
!pip install -q protobuf==3.20.*
or download the updated notebooks from the S3 bucket. That should help.

I have !pip install -q protobuf==3.20.* and also the updated notebook, but hitting the error
in C3_W2 as FileNotFoundError: [Errno 2] No such file or directory: ‘/opt/conda/lib/python3.8/site-packages/sagemaker/image_uri_config/PyTorch.json’

@Sabyasachi_Mukhopadh thank you for the message. I have refreshed your lab account. Could you please try that again, if it doesn’t work, please send me a printscreen of the error and email the notebook. My email is elena.sanina@deeplearning.ai