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
Read More:
- How to uninstall Maya on a Mac
- [Solved] Acrobat DC 2022 Install Error: Cannot Install Acrobat Update Service
- Macos: How to Solve cocoapods Install Error
- How to Install FFmpeg on Linux
- How to install PIL in Python 3
- How To Install Java with Apt-Get on Ubuntu 16.04
- Raspberry PI install VIM editor
- FreeSWITCH installation error “You must install libyuv-dev to build mod_fsv” solution
- How to Install PSSH in Centos7
- Mydumper Install Error: None of the required ‘glib-2.0’/’gthread-2.0’ found
- Install MySQL ODBC connector prompt error 1918 perfect solution (non installation of VC + + library method)
- Solve the error of jupyter labextension install
- How to Solve program install error 0x80070660
- How To Install WordPress with LAMP on Ubuntu 16.04
- How to Install MongoDB Community Edition Manually on mac and linux
- How to Solve Cython-bbox pip install Error
- [Solved] faiss Failed to install Error: No version of faiss found that meets the requirements
- Install the mxnet-gpu version to solve the problem of “OSError: libnccl.so.2” when importing
- Debian: How to install MariaDB
- Ruby Install Error running ‘requirements_osx_brew_update_system ruby-2.3.1