- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have installed OepnVino (l_openvino_toolkit_p_2021.4.752).
Installation was fine.
When I run demo
./demo_benchmark_app.sh -d GPU
I have error as
Collecting pyyaml>=5.4.1
Downloading PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (603 kB)
|████████████████████████████████| 603 kB 242 kB/s
Requirement already satisfied: requests>=2.25.1 in /usr/local/lib/python3.6/dist-packages (from -r /opt/intel/openvino_2021/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 2)) (2.27.1)
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)) (2018.1.18)
Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.6/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.12)
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.6)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.6/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.8)
Installing collected packages: pyyaml
Attempting uninstall: pyyaml
Found existing installation: PyYAML 3.12
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 153; exiting with status 1
But I have installed yaml manually using
pip install PyYAML for latest version
I can check yaml version as
(openvino_venv) nyan@nyan-Precision-7920-Tower:/opt/intel/openvino_2021/deployment_tools/demo$ python
Python 3.6.9 (default, Dec 8 2021, 21:08:43)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml
>>> print(yaml.__version__)
6.0
>>>
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi nnain1,
Thank you for reaching out to us.
This error occurs when upgrading a package, pip fails to uninstall the old version before installing the new version.
To solve this issue, use the following command:
pip install --ignore-installed PyYAML
On another note, you can check the installed PyYAML package details using the following command:
pip show PyYAML
Regards,
Hairul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is the output.
(openvino_venv) nyan@nyan-Precision-7920-Tower:~$ pip show PyYAML
Name: PyYAML
Version: 6.0
Summary: YAML parser and emitter for Python
Home-page: https://pyyaml.org/
Author: Kirill Simonov
Author-email: xi@resolvent.net
License: MIT
Location: /home/nyan/openvino_venv/lib/python3.6/site-packages
Requires:
Required-by:
(openvino_venv) nyan@nyan-Precision-7920-Tower:~$
I have installed latest PyYAML.
But in running demo, it is still trying to install PyYaml. That is the problem. Please see in original post.
I have two PyYAML, in the system there is default 3.12 version. I can't uninstall that one.
Then in virturalenv, OpenVino is set up in virtual env, there is latest PyYAML 6.0 version.
pip show PyYAML shows the version from virtualenv.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi nnain1,
I've successfully ran the demo_benchmark_app.sh script inside of my virtual environment. However, it seems like pip will also update my PyYAML 3.12 outside of the virtual environment to PyYAML 6.0.
Here are my PyYAML details before running the demo_benchmark_app.sh script:
Here are my PyYAML details after running the demo_benchmark_app.sh script:
The most probable reason for your error is that the PyYAML 3.12 outside of your virtual environment was installed via your OS package manager thus pip was unable to uninstall the PyYAML 3.12 to upgrade it to PyYAML 6.0.
You can try one of these methods to overcome this issue:
Method 1:
Upgrade your default PyYAML 3.12 outside of the virtual environment to PyYAML 6.0
Method 2:
Remove the requirements for PyYAML installation from the script as you have already installed PyYAML 6.0 in the virtual environment.
The requirements file is located in the following directory:
<openvino_install_dir>/deployment_tools/open_model_zoo/tools/downloader/requirements.in
Use a text editor (such as GNU nano) to remove the PyYAML line:
After removing the PyYAML line, you can proceed to run the demo_benchmark_app.sh script as usual.
Regards,
Hairul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes that is the solution. I updated PyYAML outside of virtualenv.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi nnain1,
Glad to know that your issue has been resolved.
This thread will no longer be monitored since this issue has been resolved. If you need any additional information from Intel, please submit a new question.
Regards,
Hairul

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page