Article ID: 000089269 Content Type: Error Messages Last Reviewed: 05/20/2022

Error: "Cannot uninstall 'PyYAML'" on Ubuntu* 20.04 with OpenVINO™ Toolkit

Environment

Ubuntu 20.04

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

Quick steps to fix "Cannot uninstall 'PyYAML'" error on Ubuntu* 20.04 when running OpenVINO™ demo_squeezenet_download_convert_run.sh script.

Description
  • Installed OpenVINO™ toolkit on Ubuntu 20.04
  • Ran demo_squeezenet_download_convert_run.sh
  • Encountered the following error
Collecting pyyaml>=5.4.1
  Downloading PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl (662 kB)
     |████████████████████████████████| 662 kB 3.6 MB/s 
Requirement already satisfied: requests>=2.25.1 in /usr/local/lib/python3.8/dist-packages (from -r /opt/intel/openvino_2021/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 2)) (2.26.0)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests>=2.25.1->-r /opt/intel/openvino_2021/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 2)) (1.26.7)
Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.8/dist-packages (from requests>=2.25.1->-r /opt/intel/openvino_2021/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 2)) (2.0.6)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests>=2.25.1->-r /opt/intel/openvino_2021/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 2)) (2019.11.28)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests>=2.25.1->-r /opt/intel/openvino_2021/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 2)) (2.8)
Installing collected packages: pyyaml
  Attempting uninstall: pyyaml
    Found existing installation: PyYAML 5.3.1
ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Error on or near line 149; exiting with status 1
Resolution
NoteOpenVINO toolkit 2021.4.2 includes preview-support for Ubuntu 20.04, see the release notes for additional information. 
  1. Run the following command to uninstall the default PyYAML 5.3.1 package:

     apt-get purge python3-yaml
     
  2. Run the demo script once more: 

    ./<installed dir>/deployment_tools/demo/demo_squeezenet_download_convert_run.sh

Related Products

This article applies to 2 products