New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Closed
Gbemiro8 opened this issue
Dec 10, 2019
· 8 comments
Closed
ERROR: Cannot uninstall ‘PyYAML’
#1884
Gbemiro8 opened this issue
Dec 10, 2019
· 8 comments
Comments
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.
This problem seems to be caused by the latest version of chatterbot using version 4.0 PyYAML, and the latest version of PyYAML is higher than this version.
My solution was to install chatterbot version 1.0.1
pip install chatterbot == 1.0.1
So that it can be installed correctly
However, I still cannot upgrade to the latest version after installation.
ERROR: chatterbot-corpus 1.2.0 has requirement PyYAML <4.0,> = 3.12, but you'll have pyyaml 5.1.2 which is incompatible.
I had this same problem. I am on Windows 10, using anaconda’s python3 distro.
When performing pip install chatterbot, it would work, but if I tried installing chatterbot-corpus, I would get the problem with pyyaml. I solved my problem with:
pip install chatterbot-corpus --ignore-installed
That’s definitely not the right solution to this problem, but it at least got things working for me.
Is there any other solution to this problem? I have seen somewhere else that one could remove the package manually but I don’t quite understand what that means.
could try pip3 install --upgrade pyyaml>=5.3
sudo -H pip3 install --upgrade pyyaml>=5.3
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.
Ubuntu OS details:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
I believe I may have corrected this issue as of the latest release (1.0.8) see #2027 for details. Essentially the solution I have decided to go with is that PyYAML is no longer going to be installed as a part of ChatterBot’s default installation.
Fee free to let me know if this doesn’t resolve your issue, or open a new ticket if you encounter any other problems.
pip3 install chatterbot-corpus --ignore-installed
I have tried this and it has worked for me :
Successfully built PyYAML
Installing collected packages: PyYAML, chatterbot-corpus
Successfully installed PyYAML-5.3.1 chatterbot-corpus-1.2.0
searching related packages name and deleting .egg-info file works.
The browser version you are using is not recommended for this site.
Please consider upgrading to the latest version of your browser by clicking one of the following links.
- Safari
- Chrome
- Edge
- Firefox
Article ID: 000089269
Content Type: Error Messages
Last Reviewed: 05/20/2022
Error: «Cannot uninstall ‘PyYAML'» on Ubuntu* 20.04 with OpenVINO™ Toolkit
Quick steps to fix «Cannot uninstall ‘PyYAML'» error on Ubuntu* 20.04 when running OpenVINO™ demo_squeezenet_download_convert_run.sh script.
- 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
Note | OpenVINO toolkit 2021.4.2 includes preview-support for Ubuntu 20.04, see the release notes for additional information. |
- Run the following command to uninstall the default PyYAML 5.3.1 package:
apt-get purge python3-yaml
- Run the demo script once more:
./<installed dir>/deployment_tools/demo/demo_squeezenet_download_convert_run.sh
- Summary
- Description
- Resolution
Need more help?
Give Feedback
Disclaimer
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
I resolved by below command:
$ pip install -U PyYAML
Defaulting to user installation because normal site-packages is not writeable
Processing ./.cache/pip/wheels/e5/9d/ad/2ee53cf262cba1ffd8afe1487eef788ea3f260b7e6232a80fc/PyYAML-5.3.1-cp36-cp36m-linux_x86_64.whl
Installing collected packages: PyYAML
Successfully installed PyYAML-5.3.1
$ pip show PyYaml
Name: PyYAML
Version: 5.3.1
Summary: YAML parser and emitter for Python
Home-page: https://github.com/yaml/pyyaml
Author: Kirill Simonov
Author-email: xi@resolvent.net
License: MIT
Location: /home/ranger/.local/lib/python3.6/site-packages
Requires:
Required-by:
SCouto
7,6685 gold badges34 silver badges49 bronze badges
asked Jun 16, 2020 at 7:02
3
sudo -H pip3 install --ignore-installed PyYAML
answered Apr 21, 2022 at 5:13
JamesJames
487 bronze badges
Problem
Today when I installed pytorch-lightning package in the Kaggle virtual environment, I got the following error message:
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.
The problem is a python module: PyYAML. I think it is the dependency package of pytorch-lightning. According to the error message, it should be installed by distutils, so the removal process cannot confirm which files belong to it, so just be partially uninstalled.
Solution
This is a problem that many people have encountered. The most commonly seen solution is to upgrade the package the parameter --ignore-installed
.
The usual update procedure is to delete the old version and then reinstall the new version, but now the problem is that we cannot identify which files belong to the old version package and need to be deleted.
After adding this parameter, we can skip the deletion process and overwrite the old version. The only problem is that there may be old version files that become system junk
The full instruction should be:
pip3 install --ignore-installed PyYAML
References
- https://stackoverflow.com/questions/49911550/how-to-upgrade-disutils-package-pyyaml
Read More
- [Python] Use PyYAML Package To Load YAML Format File
- [Python] Use «markdown» Package To Convert Markdown File To HTML Format
Error: cannot install pyyaml.
Article Directory:
1.Error cause analysis II. Final error solution
1.Error analysis
1. Start installing
I started installing yaml </ code>, using the following command:
pip install yaml
It is installed correctly and can be imported correctly from the command line, and then an error is reported when executing the program: attributeerror: module 'yaml' has no attribute 'fullloader' </ code> then I checked the version of yaml I installed:
pip show yaml # show is version 3.12, which is too old
2. Error exploration1
check the tutorial online and say that you want to update the yaml version to 5.2
. The update method is as follows:
pip install -U PyYAML
In the process of updating, an error was reported:
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.
And then continue to find out how to solve this problem. Most of the solutions given are: delete all the
, and guess what, LZ has been deleted completely. As a result, it is still this by when installing. Are you angry or not! yaml
files under site packages
3. Error exploration 2
But I had to go to pypi website to download the wheel, and then install it directly
PyYAML-5.2-cp27-cp27m-win_ amd64.whlPyYAML-5.2-cp27-cp27m-win32.whl
Then install the wheels directly:
pip install PyYAML-5.2-cp27-cp27m-win_amd64.whl
# Then it said the platform is not supported, I looked at the amd may not be supported, so I tried again 32
pip install PyYAML-5.2-cp27-cp27m-win32.whl
# Again, the platform is not supported, I'm speechless
it seems that exploration is a failure. Let's find another way!
2、 Final error resolution
Use the following installation method to solve the problem:
# it worked
pip install --ignore-installed PyYAML
Another one, I don’t test it. You can try it
pip install --force-reinstall PyYAML
or
pip install docker-py --ignore-installed PyYAML
Reference:
1 https://github.com/pypa/pip/issues/5247
2、 https://stackoverflow.com/questions/49911550/how-to-upgrade-disutils-package-pyyaml
Содержание
- Can’t pip install sagemaker on OSX / Anaconda: ERROR: Cannot uninstall ‘PyYAML’ #1117
- Comments
- System Information
- Describe the problem
- Minimal repro / logs
- In the browser then:
- Ends in:
- As you can see there are two errors. The earlier one can be resolved by doing the steps from below, but the second one (PyYAML) remains.
- Still leaves me with this:
- Installation with anaconda failed with error Cannot uninstall ‘ruamel-yaml’. #169
- Comments
- 🐛 Bug Description
- To Reproduce
- Expected Behavior
- Screenshot
- Environment
- Additional Notes
Can’t pip install sagemaker on OSX / Anaconda: ERROR: Cannot uninstall ‘PyYAML’ #1117
Please fill out the form below.
System Information
- Framework (e.g. TensorFlow) / Algorithm (e.g. KMeans): None
- Framework Version: None
- Python Version: 3.7 / Conda 4.7.12
- CPU or GPU: CPU
- Python SDK Version: latest
- Are you using a custom image: No
Describe the problem
Cannot use/install the SageMaker SDK locally on OSX Mojave (10.14.6).
Minimal repro / logs
See below steps to reproduce, starting from a clean install of Anaconda on a Mac that I just redid to start from a clean slate. I also created a clean conda environment to make it easy to reproduce this issue.
- Exact command to reproduce:
conda create -y -n sm_test python=3.7 anaconda
conda activate sm_test
jupyter notebook
In the browser then:
(New Notebook (Python3))
!pip install sagemaker
Ends in:
[..]
ERROR: jupyterlab-server 1.0.6 has requirement jsonschema>=3.0.1, but you’ll have jsonschema 2.6.0 which is incompatible.
Installing collected packages: invoke, pynacl, bcrypt, paramiko, fabric, jmespath, python-dateutil, botocore, s3transfer, boto3, protobuf, jsonschema, PyYAML, cached-property, texttable, idna, requests, docker-pycreds, websocket-client, docker, docopt, dockerpty, docker-compose, protobuf3-to-dict, sagemaker
Found existing installation: python-dateutil 2.8.1
Uninstalling python-dateutil-2.8.1:
Successfully uninstalled python-dateutil-2.8.1
Found existing installation: jsonschema 3.1.1
Uninstalling jsonschema-3.1.1:
Successfully uninstalled jsonschema-3.1.1
Found existing installation: PyYAML 5.1.2
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.
As you can see there are two errors. The earlier one can be resolved by doing the steps from below, but the second one (PyYAML) remains.
!pip install -U botocore
!pip install sagemaker
Still leaves me with this:
Installing collected packages: protobuf3-to-dict, idna, requests, websocket-client, PyYAML, docopt, cached-property, dockerpty, texttable, docker-pycreds, docker, docker-compose, sagemaker
Found existing installation: idna 2.8
Uninstalling idna-2.8:
Successfully uninstalled idna-2.8
Found existing installation: requests 2.22.0
Uninstalling requests-2.22.0:
Successfully uninstalled requests-2.22.0
Found existing installation: PyYAML 5.1.2
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.
The text was updated successfully, but these errors were encountered:
FWIW I also tried with a clean Python on OSX, but got a similar error:
pip install sagemaker
Collecting sagemaker
Requirement already satisfied: scipy>=0.19.0 in ./opt/anaconda3/lib/python3.7/site-packages (from sagemaker) (1.3.1)
Collecting requests =2.20.0 (from sagemaker)
Using cached https://files.pythonhosted.org/packages/ff/17/5cbb026005115301a8fb2f9b0e3e8d32313142fe8b617070e7baad20554f/requests-2.20.1-py2.py3-none-any.whl
Requirement already satisfied: urllib3 =1.21 in ./opt/anaconda3/lib/python3.7/site-packages (from sagemaker) (1.24.2)
Collecting protobuf>=3.1 (from sagemaker)
Using cached https://files.pythonhosted.org/packages/a5/c6/a8b6a74ab1e165f0aaa673a46f5c895af8780976880c98934ae82060356d/protobuf-3.10.0-cp37-cp37m-macosx_10_9_intel.whl
Collecting boto3>=1.9.213 (from sagemaker)
Downloading https://files.pythonhosted.org/packages/c0/c6/aa0670205b43a98029a2886d3a16155a48d6c91a5f477e7554c739da963e/boto3-1.10.16-py2.py3-none-any.whl (128kB)
|████████████████████████████████| 133kB 297kB/s
Requirement already satisfied: numpy>=1.9.0 in ./opt/anaconda3/lib/python3.7/site-packages (from sagemaker) (1.17.2)
Collecting fabric>=2.0 (from sagemaker)
Using cached https://files.pythonhosted.org/packages/d7/cb/47feeb00dae857f0fbd1153a61e902e54ed77ccdc578b371a514a3959a19/fabric-2.5.0-py2.py3-none-any.whl
Collecting protobuf3-to-dict>=0.1.5 (from sagemaker)
Collecting docker-compose>=1.23.0 (from sagemaker)
Using cached https://files.pythonhosted.org/packages/dd/e6/1521d1dfd9c0da1d1863b18e592d91c3df222e55f258b9876fa1e59bc4b5/docker_compose-1.24.1-py2.py3-none-any.whl
Collecting idna =2.5 (from requests =2.20.0->sagemaker)
Using cached https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl
Requirement already satisfied: certifi>=2017.4.17 in ./opt/anaconda3/lib/python3.7/site-packages (from requests =2.20.0->sagemaker) (2019.9.11)
Requirement already satisfied: chardet =3.0.2 in ./opt/anaconda3/lib/python3.7/site-packages (from requests =2.20.0->sagemaker) (3.0.4)
Requirement already satisfied: six>=1.9 in ./opt/anaconda3/lib/python3.7/site-packages (from protobuf>=3.1->sagemaker) (1.12.0)
Requirement already satisfied: setuptools in ./opt/anaconda3/lib/python3.7/site-packages (from protobuf>=3.1->sagemaker) (41.4.0)
Collecting s3transfer =0.2.0 (from boto3>=1.9.213->sagemaker)
Using cached https://files.pythonhosted.org/packages/16/8a/1fc3dba0c4923c2a76e1ff0d52b305c44606da63f718d14d3231e21c51b0/s3transfer-0.2.1-py2.py3-none-any.whl
Collecting jmespath =0.7.1 (from boto3>=1.9.213->sagemaker)
Using cached https://files.pythonhosted.org/packages/83/94/7179c3832a6d45b266ddb2aac329e101367fbdb11f425f13771d27f225bb/jmespath-0.9.4-py2.py3-none-any.whl
Collecting botocore =1.13.16 (from boto3>=1.9.213->sagemaker)
Downloading https://files.pythonhosted.org/packages/f4/00/4516c82f36f6b53053b0e28513cb673f462c5b969a9e7bb5e51b5627fe08/botocore-1.13.16-py2.py3-none-any.whl (5.4MB)
|████████████████████████████████| 5.4MB 5.8MB/s
Collecting paramiko>=2.4 (from fabric>=2.0->sagemaker)
Using cached https://files.pythonhosted.org/packages/4b/80/74dace9e48b0ef923633dfb5e48798f58a168e4734bca8ecfaf839ba051a/paramiko-2.6.0-py2.py3-none-any.whl
Collecting invoke =1.3 (from fabric>=2.0->sagemaker)
Using cached https://files.pythonhosted.org/packages/d9/7c/68e99f659749dbf3349ce72e2e9b581f644b8482121d92ab604145ad01ac/invoke-1.3.0-py3-none-any.whl
Collecting websocket-client =0.32.0 (from docker-compose>=1.23.0->sagemaker)
Using cached https://files.pythonhosted.org/packages/29/19/44753eab1fdb50770ac69605527e8859468f3c0fd7dc5a76dd9c4dbd7906/websocket_client-0.56.0-py2.py3-none-any.whl
Collecting dockerpty =0.4.1 (from docker-compose>=1.23.0->sagemaker)
Collecting jsonschema =2.5.1 (from docker-compose>=1.23.0->sagemaker)
Using cached https://files.pythonhosted.org/packages/77/de/47e35a97b2b05c2fadbec67d44cfcdcd09b8086951b331d82de90d2912da/jsonschema-2.6.0-py2.py3-none-any.whl
Collecting PyYAML =3.10 (from docker-compose>=1.23.0->sagemaker)
Collecting texttable =0.9.0 (from docker-compose>=1.23.0->sagemaker)
Collecting docopt =0.6.1 (from docker-compose>=1.23.0->sagemaker)
Collecting docker[ssh] =3.7.0 (from docker-compose>=1.23.0->sagemaker)
Using cached https://files.pythonhosted.org/packages/09/da/7cc7ecdcd01145e9924a8ccbe9c1baf3a362fc75d4cb150676eb5231ea60/docker-3.7.3-py2.py3-none-any.whl
Collecting cached-property =1.2.0 (from docker-compose>=1.23.0->sagemaker)
Using cached https://files.pythonhosted.org/packages/3b/86/85c1be2e8db9e13ef9a350aecd6dea292bd612fa288c2f40d035bb750ded/cached_property-1.5.1-py2.py3-none-any.whl
Requirement already satisfied: python-dateutil =2.1; python_version >= «2.7» in ./opt/anaconda3/lib/python3.7/site-packages (from botocore =1.13.16->boto3>=1.9.213->sagemaker) (2.8.0)
Requirement already satisfied: docutils =0.10 in ./opt/anaconda3/lib/python3.7/site-packages (from botocore =1.13.16->boto3>=1.9.213->sagemaker) (0.15.2)
Collecting bcrypt>=3.1.3 (from paramiko>=2.4->fabric>=2.0->sagemaker)
Using cached https://files.pythonhosted.org/packages/62/20/4c94f3f8dfc6b8720c8bc903ce2951ec6397ad864e3a64b4abdced014514/bcrypt-3.1.7-cp34-abi3-macosx_10_6_intel.whl
Requirement already satisfied: cryptography>=2.5 in ./opt/anaconda3/lib/python3.7/site-packages (from paramiko>=2.4->fabric>=2.0->sagemaker) (2.7)
Collecting pynacl>=1.0.1 (from paramiko>=2.4->fabric>=2.0->sagemaker)
Using cached https://files.pythonhosted.org/packages/cd/c9/4d6deea9d900345b1243cc3e6265110697fae5e594689cfa1ba34e0ef4a8/PyNaCl-1.3.0-cp34-abi3-macosx_10_6_intel.whl
Collecting docker-pycreds>=0.4.0 (from docker[ssh] =3.7.0->docker-compose>=1.23.0->sagemaker)
Using cached https://files.pythonhosted.org/packages/f5/e8/f6bd1eee09314e7e6dee49cbe2c5e22314ccdb38db16c9fc72d2fa80d054/docker_pycreds-0.4.0-py2.py3-none-any.whl
Requirement already satisfied: cffi>=1.1 in ./opt/anaconda3/lib/python3.7/site-packages (from bcrypt>=3.1.3->paramiko>=2.4->fabric>=2.0->sagemaker) (1.12.3)
Requirement already satisfied: asn1crypto>=0.21.0 in ./opt/anaconda3/lib/python3.7/site-packages (from cryptography>=2.5->paramiko>=2.4->fabric>=2.0->sagemaker) (1.0.1)
Requirement already satisfied: pycparser in ./opt/anaconda3/lib/python3.7/site-packages (from cffi>=1.1->bcrypt>=3.1.3->paramiko>=2.4->fabric>=2.0->sagemaker) (2.19)
ERROR: jupyterlab-server 1.0.6 has requirement jsonschema>=3.0.1, but you’ll have jsonschema 2.6.0 which is incompatible.
Installing collected packages: idna, requests, protobuf, jmespath, botocore, s3transfer, boto3, bcrypt, pynacl, paramiko, invoke, fabric, protobuf3-to-dict, websocket-client, dockerpty, jsonschema, PyYAML, texttable, docopt, docker-pycreds, docker, cached-property, docker-compose, sagemaker
Found existing installation: idna 2.8
Uninstalling idna-2.8:
Successfully uninstalled idna-2.8
Found existing installation: requests 2.22.0
Uninstalling requests-2.22.0:
Successfully uninstalled requests-2.22.0
Found existing installation: jsonschema 3.0.2
Uninstalling jsonschema-3.0.2:
Successfully uninstalled jsonschema-3.0.2
Found existing installation: PyYAML 5.1.2
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.
Sorry for the slow response here. The error message comes from pip 10, which won’t uninstall distutills projects, unlike previous versions of pip: pypa/pip#5247
Источник
Installation with anaconda failed with error Cannot uninstall ‘ruamel-yaml’. #169
🐛 Bug Description
When installing with anaconda, it fails with error:
To Reproduce
Steps to reproduce the behavior:
- clone conda environment from base: conda create —name qlibtest —clone base
- pip install pyqlib
Expected Behavior
qlib installation successfully.
Screenshot
Environment
Note: User could run cd scripts && python collect_info.py all under project directory to get system information
and paste them here directly.
- Qlib version: 0.6.1
- Python version: 3.7
- Conda 4.9.2
- OS ( Windows , Linux , MacOS ): Windows 10
- Commit number (optional, please provide it if you are using the dev version): from pip
Additional Notes
The text was updated successfully, but these errors were encountered:
Hi, this is an error caused by the pip and ruamel-yaml you have already installed on your machine. You can either try with pip install pyqlib —ignore-installed ruamel.yaml or remove the installed files of ruamrl.yaml under your conda environment rm -rf /path/to/anaconda3/lib/python3.7/site-packages/ruamel* .
pip install pyqlib —ignore-installed ruamel.yaml gives a different error:
After removing ruamel folder, it still gives same error Cannot uninstall ‘ruamel-yaml’ , probably somewhere else still has the registry of the package, since it’s directly deleting folder, rather than using conda command to remove the package.
I managed to install from source by changing ruamel.yaml>=0.16.12 to ruamel.yaml . Is there any particular reason qlib needs a higher version of this ruamel package?
Thanks for letting me know!
Well, the ruamel-yaml package is used to read YAML files for Qlib’s benchmark workflows. I haven’t tried with lower version of ruamel-yaml when running models with the qrun command.
I will look into that and see if lower version of ruamel-yaml works well with the workflows.
got the same problem here. The only workaround is to ignore this ruamel.yaml?
Hi checking Anaconda Navigator shows multiple Yaml versions — is that expected? What version do you recommend I keep if only one is permitted? I am going to try and set up a new environment for QLIB and re-try to install.
Hi — I have attached my error logs for this as I have tried a couple of times to resolve this to get QLIB installed and running on Linux as advised. While Yaml looks likely to be the cause its not clear if there are other issues. Probably a result of me trying to install multiple times or doing something wrong? I greatly appreciate any help on this as it looks like a library with many valuable attributes that are hard to find in one package.
qlib_error_log.txt
Hi — I have attached my error logs for this as I have tried a couple of times to resolve this to get QLIB installed and running on Linux as advised. While Yaml looks likely to be the cause its not clear if there are other issues. Probably a result of me trying to install multiple times or doing something wrong? I greatly appreciate any help on this as it looks like a library with many valuable attributes that are hard to find in one package.
qlib_error_log.txt
Installing https://linuxconfig.org/how-to-install-g-the-c-compiler-on-ubuntu-20-04-lts-focal-fossa-linux seems to have solved the install issue ie installing G++ the C++ compiler on Ubuntu — not sure if that impacts all Ubuntu users or only my setup but worth checking for other users and including as a check in the install notes if thats the case.
Hi — after a successful install I ran the first example as per
https://github.com/microsoft/qlib#auto-quant-research-workflow for the LighGBM example I get the following error. Does that show I have an old or outdated numpy file?
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject.
For any other newcomers to Qlib this error is easy to fix — no idea why this is the case but a simple numy uninstall and install fixes this problem. https://stackoverflow.com/questions/66060487/valueerror-numpy-ndarray-size-changed-may-indicate-binary-incompatibility-exp
Traceback (most recent call last):
File «/home/warren/anaconda3/envs/QLIB3TEST/bin/qrun», line 5, in
from qlib.workflow.cli import run
File «/home/warren/anaconda3/envs/QLIB3TEST/lib/python3.8/site-packages/qlib/workflow/cli.py», line 12, in
from qlib.model.trainer import task_train
File «/home/warren/anaconda3/envs/QLIB3TEST/lib/python3.8/site-packages/qlib/model/init.py», line 6, in
from .base import Model
File «/home/warren/anaconda3/envs/QLIB3TEST/lib/python3.8/site-packages/qlib/model/base.py», line 5, in
from ..data.dataset import Dataset
File «/home/warren/anaconda3/envs/QLIB3TEST/lib/python3.8/site-packages/qlib/data/init.py», line 8, in
from .data import (
File «/home/warren/anaconda3/envs/QLIB3TEST/lib/python3.8/site-packages/qlib/data/data.py», line 20, in
from .cache import H
File «/home/warren/anaconda3/envs/QLIB3TEST/lib/python3.8/site-packages/qlib/data/cache.py», line 36, in
from .ops import Operators
File «/home/warren/anaconda3/envs/QLIB3TEST/lib/python3.8/site-packages/qlib/data/ops.py», line 19, in
from ._libs.rolling import rolling_slope, rolling_rsquare, rolling_resi
File «qlib/data/_libs/rolling.pyx», line 1, in init qlib.data._libs.rolling
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
(QLIB3TEST) warren@warren-VivoBook-ASUSLaptop-X512DA-X512DA:
Any help resolving that would be greatly appreciated thank you as close to being able to run a test using Qlib!
Источник
The browser version you are using is not recommended for this site.
Please consider upgrading to the latest version of your browser by clicking one of the following links.
- Safari
- Chrome
- Edge
- Firefox
Article ID: 000089836
Content Type: Error Messages
Last Reviewed: 05/20/2022
Error: “Cannot Uninstall ‘PyYAML’” When Running the OpenVINO™ Toolkit Benchmark Demo Script in Virtual Environment
Upgrade PyYAML version manually outside the virtual environment.
- Ran OpenVINO™ Toolkit Benchmark Demo in virtual environment:
./demo_benchmark_app.sh -d GPU
- Encountered error:
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
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.
When running Benchmark Demo Script, the PyYAML version will be updated (pyyaml>=5.4.1) in all environments. However, pip in virtual environment is unable to update the PyYAML version in the default system environment.
- Update the PyYAML version manually outside the virtual environment:
pip install —ignore-installed PyYAML - Run OpenVINO™ Toolkit Benchmark Demo in virtual environment again:
./demo_benchmark_app.sh -d GPU
- Summary
- Description
- Resolution