MicrosoftLearning / mslearn-azure-ml

https://microsoftlearning.github.io/mslearn-azure-ml/
MIT License
168 stars 197 forks source link

from-typing-extensions-import-paramspec-importerror-cannot-import-name-paramsp #91

Closed kavsrd13 closed 1 month ago

kavsrd13 commented 3 months ago

Module: all

Lab/Demo: all

Task: while running notebook of any lab

Step:

Description of issue from-typing-extensions-import-paramspec-importerror-cannot-import-name-paramsp

Repro steps: temparory steps to resolve the issue to install these packages "pip uninstall typing_extensions pip uninstall fastapi pip install --no-cache fastapi"

1. 1. 1.

kwame-mintah commented 3 months ago

I found a workaround of installing typing-extension 4.12.2 -> 4.3.0 onto my compute instance: pip install typing-extensions==4.3.0

(azureml_py38) azureuser@dp-100-dev-compute-insta:~/cloudfiles/code/Users/kwame_mintah$ pip install typing-extensions==4.3.0
Collecting typing-extensions==4.3.0
  Downloading typing_extensions-4.3.0-py3-none-any.whl (25 kB)
ERROR: tensorflow 2.5.0 has requirement numpy~=1.19.2, but you'll have numpy 1.21.6 which is incompatible.
ERROR: tensorflow 2.5.0 has requirement typing-extensions~=3.7.4, but you'll have typing-extensions 4.3.0 which is incompatible.
ERROR: sqlalchemy 2.0.30 has requirement typing-extensions>=4.6.0, but you'll have typing-extensions 4.3.0 which is incompatible.
ERROR: datasets 2.3.2 has requirement dill<0.3.6, but you'll have dill 0.3.6 which is incompatible.
ERROR: dask-sql 2023.6.0 has requirement pandas>=1.4.0, but you'll have pandas 1.1.5 which is incompatible.
ERROR: azureml-inference-server-http 0.8.4 has requirement flask<2.3.0, but you'll have flask 2.3.2 which is incompatible.
ERROR: azure-storage-file-share 12.16.0 has requirement azure-core>=1.28.0, but you'll have azure-core 1.26.4 which is incompatible.
ERROR: azure-storage-file-share 12.16.0 has requirement typing-extensions>=4.6.0, but you'll have typing-extensions 4.3.0 which is incompatible.
ERROR: azure-storage-file-datalake 12.15.0 has requirement azure-core>=1.28.0, but you'll have azure-core 1.26.4 which is incompatible.
ERROR: azure-storage-file-datalake 12.15.0 has requirement azure-storage-blob>=12.20.0, but you'll have azure-storage-blob 12.13.0 which is incompatible.
ERROR: azure-storage-file-datalake 12.15.0 has requirement typing-extensions>=4.6.0, but you'll have typing-extensions 4.3.0 which is incompatible.
ERROR: azure-cli 2.49.0 has requirement azure-keyvault-keys==4.8.0b2, but you'll have azure-keyvault-keys 4.8.0 which is incompatible.
ERROR: azure-cli 2.49.0 has requirement azure-mgmt-keyvault==10.2.0, but you'll have azure-mgmt-keyvault 10.2.1 which is incompatible.
ERROR: azure-cli 2.49.0 has requirement azure-mgmt-resource==22.0.0, but you'll have azure-mgmt-resource 21.1.0b1 which is incompatible.
ERROR: arviz 0.11.2 has requirement typing-extensions<4,>=3.7.4.3, but you'll have typing-extensions 4.3.0 which is incompatible.
Installing collected packages: typing-extensions
  Attempting uninstall: typing-extensions
    Found existing installation: typing-extensions 4.12.2
    Uninstalling typing-extensions-4.12.2:
      Successfully uninstalled typing-extensions-4.12.2
Successfully installed typing-extensions-4.3.0
afelix-95 commented 1 month ago

This seems to have been a temporary issue with the typing-extensions installation in Azure. ImportError: cannot import name 'ParamSpec' from 'typing_extensions' normally occurs when there is an outdated version of this module installed. Since the version currently installed in Azure is 4.12.2, which is the latest available as of 07/24/24, it should work normally without any issues. Closing this issue after testing the labs and not being able to reproduce this error.