In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains the solution of "No module named yum" error in python development. Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn the solution to the "No module named yum" error in python development.
The following error occurred when installing software with yum today:
There was a problem importing one of the Python modulesrequired to run yum. The error leading to this problem was: No module named yumPlease install a package which provides this module, orverify that the module is installed correctly.It's possible that the above module doesn't match thecurrent version of Python, which is:2.7.2 (default, Feb 15 2016, 15:15:03) [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)]
Yum error. After searching, we know that yum and Python are dependencies, and yum is a module of python, so the following solution is adopted:
[root@master1 ~] # pythonPython 2.7.2 (default, Feb 15 2016, 15:15:03) [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux2Type "help", "copyright" "credits" or "license" for more information. [root@master1 ~] # whereis pythonpython: / usr/bin/python2.6 / usr/bin/python.bak / usr/bin/python / usr/lib/python2.6 / usr/lib64/python2.6 / usr/local/bin/python2.7 / usr/local/bin/python2.7-config / usr/local/bin/python / usr/local/lib/python2.7 / usr/include/python2.6 / usr/share/man/man1/python.1.gz
It must be caused by the inconsistency between the version of yum and the current version of python
So modify the configuration of yum
Modify the file: vim / usr/bin/yum
Modify the header #! / usr/bin/python = > #! / usr/bin/python2.6 to solve the problem
At this point, I believe that you have a deeper understanding of the "No module named yum" error solution in python development, so you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.