python升级安装后的yum的修复

什么是PON(无源光纤网络)、PON的发展及演进 全球知名媒体Omdia在光纤和铜缆接入设备预测报告中对2022年2月的预测显示,PON设备端口收入预计在2020年至2027年期间以12.3%的年复合增长率增长,到2027年将达到163亿美元,远高于2020年的82亿美元。 此前,Omdia有份报告称,在3月份举行的美国OFC展会中,众多 CSP 正在顺利部署 XGS PON(10G 对称),其他 CSP 专注于基于 GPON 的低速 FTTH 服务。另外关于25G PON 和 50G PON 之间的争论仍在继续,而Omdia 认为 25G PON 和 5 阅读详情
升级python版本后,运行yum
# yum -y install openssl
提示如下:
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   No module named yum

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.3 (default, Jul 15 2014, 16:52:36) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
  http://wiki.linux.duke.edu/YumFaq

分析应该是yum和Python是依赖关系,yum是python的模块,所以需要修改yum来解决:
1. 查看python的安装路径
# python
Python 2.7.3 (default, Jul 15 2014, 16:52:36) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
# whereis python
python: /usr/bin/python2.4 /usr/bin/python /usr/bin/python2.6 /usr/lib/python2.4 /usr/local/bin/python 
/usr/local/bin/python2.6-config /usr/local/bin/python3.3-config /usr/local/bin/python3.3 /usr/local/bin/python3.3m 
/usr/local/bin/python3.3m-config /usr/local/bin/python2.6 /usr/local/lib/python2.4 /usr/local/lib/python3.3 
/usr/local/lib/python2.6 /usr/include/python2.4 /usr/share/man/man1/python.1.gz

2. 修改yum
# vim /usr/bin/yum
将 #!/usr/bin/python 改成  #!/usr/bin/python2.4
【保存并退出】

3. 再测试yum安装,成功;
PD3.0详解 第十一章 策略层 电源协商(三)(sink端) 前面大师匈介绍了Source端的内容,今天再看一下sink端的内容。大师匈还是想把标准文件的状态机拿出来说一下。大师匈把一张图分成俩部分,大家凑合看一下,一张图实在看不清内容。 Sink 端电源协商状态机。基于sink端哦!!! 上图先!!! 上面俩张图就是整个SINK端口的状态机了。。。介绍一下这个流程: 1、收到hardreset或者刚上电的进入PE_SNK_Startup开始状态。 2、在PE_SNK_Startup阶段后进入PE_SNK_Discovery,并等待Vbus的到来。 3、当Vbus 阅读详情

相关推荐

[工具使用]黑暗引擎FOFA

黑暗引擎FOFAFOFA(点我进入)逻辑运算符搜索子域名domain搜索指定内容的host全部域名bodycert搜索选定应用的网站搜索指定开放端口的IP搜索指定协议的IP搜索IP或者网段的信息搜索指定CSS/JS网站常用的一些内容其他 FOFA(点我进入) 官网这样描述:FOFA是白帽汇推出的一款网络空间资产搜索引擎。它能够帮助用户迅速进行网络资产匹配、加快后续工作进程。例如进行漏洞影响范围分析、应用分布统计、应用流行度排名统计等。 简单理解就是,一个本土加强版shodan,知道某产品在互联网的部署情况、

网络安全知识分享 3万+

yum报错

今天用yum安装软件的时候出现如下错误: There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: No module named yum Please install a package which provides this module, or verify that the module is installed corr

进行中 1015

OFDM调制matlab仿真详细代码

MATLAB仿真代码 % ================================================== % 作者: 肆拾伍 % 时间:11/30 2019 % 版本:V3 % =================OFDM仿真参数说明:================ % % 子载波数 carrier_count ---200 % 总符号数 symbol_count ...

肆拾伍的博客 3万+

(c语言)strcpy函数用法

(c语言)strcpy函数用法如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入 NAME strcpy, strncpy - copy a string SYNOPSIS #include <string.h> char *strcpy(char *dest, const char *

qq_21480495的博客 1353

基于STM32的工业I/O模块硬件电路实现

深入解析基于STM32的工业I/O模块硬件电路实现,涵盖关键电路设计与信号处理,突出硬件电路稳定性和工业级可靠性,适合嵌入式开发者参考。

weixin_35835018的博客 456

DETRs with Collaborative Hybrid Assignments Training论文阅读与代码

在这篇论文中,作者观察到在DETR中将过少的 Query 分配为正样本,采用一对一的集合匹配,会导致对编码器输出的监督稀疏,严重损害编码器的区分特征学习,反之亦然,也会影响解码器中的注意力学习。为了缓解这个问题,作者提出了一种新颖的协同混合分配训练方案,名为Co-DETR,以从多样的标签分配方式中学习更高效、更有效的基于DETR的检测器。这种新的训练方案可以通过训练多个并行辅助 Head ,以一对多的标签分配方式(如ATSS和Faster RCNN)进行监督,轻松增强端到端检测器中编码器的学习能力。

qingjing0413的博客 1156

安装python多版本导致yum命令错误(No module named yum)的解决办法

检查一下python环境 [root@master ~]# yum There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: No module named yum Please install a package which provides this module, or verify that the module is inst

weixin_37477226的博客 2917

西门子1200PLC编程实战:OB、FC、FB与DB的深度解析与应用技巧

本文深度解析西门子1200PLC编程中OB、FC、FB与DB四大核心功能块的应用技巧。通过工厂化比喻,阐明OB作为程序总调度、FC作为可重用函数、FB作为带记忆的智能设备以及DB作为数据仓库的角色与关系,并提供实战技巧,帮助工程师构建结构清晰、易于维护的高效PLC程序。

weixin_29280657的博客 441

Centos: 完美解决python升级导致的yum报错问题(相信我这是一篇有用的文章)

问题大致如下: There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: No module named yum Please install a package which provides this module, or verify that the module is installed correctly. It’s poss

qq_43238405的博客 1万+

2、微软 Power Automate 入门指南

本文是一篇关于微软 Power Automate 的入门指南,详细介绍了 Power Automate 的基本概念、相关术语、登录方式以及如何创建一个简单的自动化流。文章还探讨了 Power Automate 在业务流程中的应用场景和优势,并展望了其高级功能和未来发展。适合希望快速入门 Power Automate 并提升业务自动化效率的读者。

corn8的博客 442

第一讲:halcon模板匹配捆绑测量矩形检测芯片针脚

使用halcon模板匹配捆绑测量矩形,检测位置发生变换的芯片针脚缺陷。

uiopmn1的博客 2995

通过yum安装最新版本的python

要通过 yum 安装最新版本的 Python,需要执行以下步骤: 首先,确保你的系统已经安装了 yum,这是一个用于在 Red Hat 系统上安装软件包的工具。如果没有安装 yum,请先安装 yum。 然后,使用 yum 更新软件包列表。打开终端,并输入以下命令: yum update 接下来,使用 yum 安装 Python。输入以下命令: yuminstall python 这...

weixin_35757191的博客 6725

24、中性原子量子计算:原理、方法与实验

本文系统介绍了中性原子量子计算的原理、方法与实验进展。重点阐述了利用碱金属原子作为量子比特,通过磁光阱、光偶极阱和光晶格等技术实现原子捕获与控制的方法。同时,详细分析了单量子比特门操作和量子态工程的实现手段,并总结了相关实验结果与未来发展方向。该技术路线为构建大规模量子计算系统提供了可行方案。

ol789012的博客 246

【Linux】CentOS升级Python2.7, yum修复,pip修复和lxml安装

CentOS升级Python2.7, yum修复,pip修复和lxml安装 如果你看到了这篇文章,你可能已经已经翻阅了无数的centos安装python教程,可能都没有作用,甚至还把环境快搞报废了,网上有的教程实在是**太不负责任!** 不要气馁,在这里我把我踩的坑尽量罗列出来,争取让您一步到位解决centos升级python环境问题!

蛮三刀酱 4776

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

Linux下将python2.6升级到2.7 yum修复及pip安装

Linux下将python2.6升级到2.7 安装pip 以及升级中遇到问题的解决方法 python2.6版本有很多局限性:最重要的就是,当前最新的pip版本已经不再支持python2.6;这给我们安装很多python库增加了很多不便;所以这里把我升级python2.6--2.7的过程及遇...

469

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

CentOS 6.5升级Python版本、修复yum和安装模块

CentOS python版本是V2.6.6,升级3.4.3。 下载 安装包  wget http://www.python.org/ftp/python/3.4.3/Python-3.4.3.tgz 解压安装包  tar -zxvf Python-3.3.0.tgz   进入解压后目录  cd Python-3.3.0    编译安装  ./configure

xiaojun11的专栏 2736

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

CentOS7 yum安装的rh-python3.8升级pip后报错ModuleNotFoundError: No module named ‘pip’ 修复

1.使用python3.8 -m ensurepip --upgrade修复并升级该版本python的pip到最新版本,pip二进制文件在 /opt/rh/rh-python38/root/local/bin/ 目录下。CentOS7用yum安装rh-python3.8后,原始pip版本为19.9,用命令行升级后在运行该版本的pip就会报错No module named ‘pip’# 复制site-package/pip-xxxx.dist-info目录。3.重新创建pip3.8的软链接。

flash_star的博客 346

CENTOS手动安装修复python ,YUM CENTOS手动安装修复YUM

CENTOS手动安装修复YUM 2019年3月8日杨宇Comments0 Comment 目录[hide] 一、问题场景 二、手动修复 2.1 下载 rpm 包 2.2 安装 rpm 包 2.3 可以使用了 三、python 升级小建议 一、问题场景 centos 上的 python 版本默认比较低,很多同学都会手动升级 python 的版本到 3.x。...

weixin_30578677的博客 291

python从安装开始加粉_Linux下将python2.6升级到2.7 yum修复及pip安装

Linux下将python2.6升级到2.7 安装pip 以及升级中遇到问题的解决方法python2.6版本有很多局限性:最重要的就是,当前最新的pip版本已经不再支持python2.6;这给我们安装很多python库增加了很多不便;所以这里把我升级python2.6--2.7的过程及遇到的坑 记录一下:实验系统版本centos6+ ;centos7+版本自带的python版本就是2.7+的。第一...

weixin_39706441的博客 71

linux修复python,CentOS 5.6 系统Python升级 和 Yum工具的修复

CentOS 5.6操作系统默认的Python版本是2.4,这个版本相对于较新版本的Python3.0已经非常老了。因此,多数情况下使用CentOS 5.6操作系统时会升级Python的版本,但是CentOS 5.6操作系统的Yum工具是基于Python2.4的,因此,Python的升级常常伴随着Yum工具的不能使用。那么,有没有办法既升级了Python版本,还能保证Yum可以继续使用呢?解决方案...

weixin_28808145的博客 271

centos7下,源码离线升级gcc、glibc等系统库,以及yum修复方法

make 报错 :configure: error: C++ compiler missing or inoperational。升级原因:pyinstaller打包平台gblic版本太高,部署机器版本低,导致可执行程序无法正常启动。说明:这里使用了在线安装g++的方式,因为yum可以自动下载适合操作系统的版本,并且同时下载好相关依赖。:yum下载安装包,然后移动到离线环境服务器上,使用rpm离线安装方式。需要升级的库(如下图):gcc、make、bison、python。7)清除缓存,生成新的缓存。

qq_38418314的博客 3207

centos6.9安装yum和其依赖

(升级或卸载Python导致 yum出错) 一: 升级python导致yum出错   1.cd /usr/bin/yum   2.#!/usr/bin/python 修改为 #!/usr/bin/python2.6         二 :完全重装python和yum(卸载系统的安装的python)   <1> 删除python包     1. wh...

weixin_42774642的博客 2691

Centos7系统升级python至3.10.1并修复yum,pip,openssl“完整”教程

本次使用系统:Centos7.6(官方镜像)X86_64架构。 更新python完成并修复好yum错误的超详细教程

m0_66724697的博客 1万+

linux中yum升级python,Linux下升级安装python3.8并配置pip及yum的教程.pdf

Linux下下升升级级安安装装python3.8并并配配置置pip及及yum的的教教程程这篇文章主要介绍了Linux下升级安装python3.8并配置pip及yum的教程,本文给大家介绍的非常详细,具有一定的参考借鉴 值,需要的朋友可以参考下服务器的CentOS 7中自带的python版本是python-2.7.5,需要再安装一个 python-3.8.1一一、、查看看版版本本安装前查看一下是否已...

weixin_30110807的博客 638

python版本升级导致_Centos6.9升级python版本,导致误删原python和yum后的解决办法

事故背景:前几天因项目需要,在服务器上搭建python3模块,误操作将原python2.6.6,导致yum文件不能用.........现在只能含泪修复,博主在网上搜了一圈办法,基本上都不是那么的详细,现在记下这一方法,希望能帮到与我情况相同的朋友~1:卸载python(以免有些同学没有卸载干净)2.卸载yum3.验证是否删除干净4.安装python和yum在以下链接的镜像站中找到你系统对应版本的p...

weixin_39737831的博客 179
上一篇: 轻量级web server Tornado代码分析
下一篇: CentOS6.4安装python2.7.3环境和Tornado
北雨南萍
北雨南萍 领域专家: 操作系统技术领域 领域专家: 操作系统技术领域
博客等级 码龄20年 2665粉丝 453原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

北雨南萍

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值