点击关注,桓峰基因
桓峰基因
生物信息分析,SCI文章撰写及生物信息基础知识学习:R语言学习,perl基础编程,linux系统命令,Python遇见更好的你
122篇原创内容
公众号
环丰基因组公众号推出了一门基于基因组变异数据的生命信息分析课程,并配备了视频在线教程。教程目录如下:
[En]
Huanfeng Genome official account has launched a course on life information analysis based on genomic variation data and equipped with video online tutorials. The catalogue of tutorials is as follows:
DNA 1. Germline Mutation Vs. Somatic Mutation 傻傻分不清楚
DNA 2. SCI 文章中基因组变异分析神器之 maftools
DNA 3. SCI 文章中基因组变异分析神器之 maftools
DNA 4. SCI 文章中基因组的突变信号(maftools)
DNA 5. 基因组变异文件VCF格式详解
DNA 6. 基因组变异之绘制精美瀑布图(ComplexHeatmap)
DNA 7. 基因组拷贝数变异分析及可视化 (GISTIC2.0)
DNA 8. 癌症的突变异质性及寻找新的癌症驱动基因(MutSigCV)
DNA 9. 揭秘肿瘤异质性与TMB, MSI之间的相关性
肿瘤异质性指肿瘤内既有致瘤细胞亚群,也有非致瘤细胞亚群。那么肿瘤异质性到底与肿瘤负荷以及微卫星不稳定性到底有什么关系呢?我们这期就用直肠癌的数据进行实际验证一下,方法比较简单,有分析不足的地方,望大家指正!!!
; 前言
肿瘤异质性是指在肿瘤生长过程中,其子细胞经过多次分裂和增殖后,表现出分子生物学或遗传学的变化。因此,在肿瘤生长速度、侵袭能力、药物敏感性、预后等方面存在差异。简而言之,肿瘤的异质性意味着肿瘤中既有致癌细胞亚群,也有非致瘤细胞亚群。
[En]
Tumor heterogeneity means that in the process of tumor growth, after many division and proliferation, its daughter cells show molecular biological or genetic changes. as a result, there are differences in tumor growth rate, invasive ability, drug sensitivity, prognosis and so on. In short, tumor heterogeneity means that there are both tumorigenic and non-tumorigenic cell subsets in the tumor.
1. 肿瘤突变负荷 (TMB)
肿瘤突变负荷(tumor mutational burden,TMB)是指在一个特定的肿瘤组织当中相对的基因突变数量,即检测的肿瘤样本中,所评估基因的外显子编码区每兆碱基序列中发生突变的总数。TMB是一个数值,具有高低之分,目前高低TMB的分界值没有统一的标准。
2. 等位基因突变的肿瘤异质性 (MATH)
等位基因突变的肿瘤异质性(mutant-allele tumor heterogeneity,MATH)是基于肿瘤内所有等位基因突变频率(mutant-allele frequencies)来对肿瘤样本的基因异质性进行量化的一种算法,通过计算,每一个样本可以获得一个MATH 值,MATH值的高低反映了肿瘤异质性的高低。
3. 微卫星不稳定性 (MSI)
微卫星不稳定性(Microsatellite Instability,MSI),是指由于在DNA复制时插入或缺失突变引起的微卫星(Microsatellite, MS)序列长度改变的现象。在DNA的复制过程中,DNA聚合酶在遇到串联重复序列时会发生"打滑",引起微卫星位点中核苷酸的插入或缺失。而这一过程可以被错配修复(mismatch repair,MMR)系统所识别并修复,若MMR基因发生启动子区的高甲基化或编码区的突变,导致其功能丧失,则会无法及时修复微卫星中自发的高频长度变异,从而引起MSI。当DNA错配修复功能(mismreprinter,MMR)异常时,微卫星的复制错误无法纠正并且连续积累,使微卫星的序列长度或碱基组成发生变化,这称为微卫星不稳定性(MSI),并使基因组表现出高突变表型。在肿瘤中,MMR功能缺陷通常是由MMR基因(MLH1,MSH2,MSH6和PMS2)和相关基因EPCAM的致病性突变引起的,或者可能是由MHL1启动子区域的高甲基化引起的缺乏MLH1的表达导致。MS序列可以位于基因的重要非编码区,也可以位于基因的编码区,多态性分布于整个基因组,个体差异大。MSI现象于1993年被Jacobs等人在结直肠癌中首次发现。随着针对MSI的研究深入,发现MSI现象不止存在于结直肠癌,在子宫内膜癌、胃癌、肝细胞癌、乳腺癌等实体瘤中均有发生。
; 计算方法
1. TMB计算方法
计算公式: TMB(mut/mb)= 总突变数量(包括同义、非同义点突变、置换、插入及缺失突变) / 目标区域编码区大小。
2. MATH计算方法
首先通过测序数据计算每个样本的MAF(mutant-allele fractions)值, 再通过MAF计算得到MAD(median absolute deviation)值,也就是计算每个MAF值与其中位数的绝对差值,并将这些绝对差值的中位数再乘以一个常量(1.4826),从而获得MAD值。最后将MAD值除以MAF的中位数,再乘以100。
3. MSI计算方法
随着高通量测序平台的广泛应用,NGS平台目标区域测序(即NGS panel)或全外显子组测序(WES)或全基因组测序(WGS)开始应用于MSI检测,使用计算工具来同时研究基因组上的大量微卫星序列成为可能,已报道的基于NGS平台的MSI算法包括几种软件,比如:MSIsensor, MANTIS等。
数据下载及整理
1. 软件安装
我们使用TCGAbiolinks软件包下载TCGA-COAD的数据,然后使用maftools对数据进行读取以及计算MATH,TMB等。
if (!require("BiocManager")) install.packages("BiocManager")
if (!require(maftools)) BiocManager::install("maftools")
if (!require(TCGAbiolinks)) BiocManager::install("TCGAbiolinks")
library(TCGAbiolinks)
library(maftools)
2. 数据下载
在计算MATH时,我们需要同时下载突变位点和拷贝数变异数据,以及临床数据来获得MSIscore。
A. 突变位点数据下载
突变数据下载我们只考虑Primary Tumor的样本,选择数据集TCGA-COAD,数据类型等。
querySNV <- gdcquery(project="TCGA-COAD" , data.category="Simple Nucleotide Variation" data.type="Masked Somatic Mutation" workflow.type="Aliquot Ensemble Somatic Variant Merging and Masking" sample.type="c("Primary" tumor")) # gdcdownload(querysnv) < code></->
B. 拷贝数变异数据下载
CNV数据下载我们同样也只考虑Primary Tumor的样本,选择数据集TCGA-COAD,数据类型等。
queryCNV <- gdcquery(project="TCGA-COAD" , data.category="Copy Number Variation" data.type="Copy Number Segment" sample.type="c("Primary" tumor")) # gdcdownload(querycnv) < code></->
C. 临床数据下载
临床数据需要我们登录cbioportal下载,当然也可以通过TCGAbiolinks,但是这个方法只能获得MSI的类型,却得不到具体的数值,所以尝试了一下,直接下载更便捷,显著链接如下:
https://www.cbioportal.org/study/summary?id=coadread_tcga_pan_can_atlas_2018
选择charts,点击下载即可下载完成,如下:
但是下载之后,发现没有MSI数据,于是又重新下载,记得选择Select all,这样才能保证下载到所有的临床信息,如下:
; 3. 数据整理
下载后,我们需要进一步整理数据,以保持样本数量的一致性,才能进行后续分析。
[En]
After downloading, we need to further collate the data in order to keep the sample number consistent before we can do follow-up analysis.
1. 突变数据整理
下载之后通过GDCprepare调取突变表格,并将整理后的数据进行保存,以备后续使用方便!
SNVdata <- 100 gdcprepare(querysnv) snvdata$tumor_sample_barcode="substr(SNVdata$Tumor_Sample_Barcode," 1, 12) snvdata$t_vaf="SNVdata$t_alt_count/SNVdata$t_depth" * snvdata[1:5, 1:5] write.table(snvdata, "coad.maf", row.names="F," sep="\t" , quote="F)" < code></->
2. CNV数据整理
下载之后通过GDCprepare调取CNV表格,并将整理后的数据进行保存,以备后续使用方便!
CNVdata <- gdcprepare(querycnv) head(cnvdata) cnvdata$sample="substr(CNVdata$Sample," 1, 12) seg <- cnvdata[, c(7, 2:6)] head(seg) write.table(seg, "coad.seg.txt", row.names="F," sep="\t" , quote="F)" < code></->
3. 临床数据整理
下载后,组织表单,并保存排序后的数据以供后续使用!
[En]
After downloading, organize the form, and save the sorted data for subsequent use!
clinData <- read.table("coadread_tcga_pan_can_atlas_2018_clinical_data.tsv", header="T," sep="\t" ) colnames(clindata)[which(colnames(clindata)="=" "patient.id")]="Tumor_Sample_Barcode" < code></->
4. 数据读取
通过maftools读入突变数据以及临床数据,如下:
coad = read.maf(maf = SNVdata, clinicalData = clinData)
计算TMB, MATH, MSIscore
通过maftools中函数tmb计算TMB,以及绘制TMB分布图。
1. 计算TMB
## 计算TMB
tmb <- tmb(maf="coad," capturesize="35.8," logscale="T)" head(tmb) < code></->
将我们的数据与TCGA泛癌进行比较,我们发现COAD的突变率还是非常高的,由于我们数据只是原发灶的样本,而原始数据中还有复发转移的样本,故我们的结果比数据库所有的样本平均值偏低一些。
laml.mutload = tcgaCompare(maf = coad, cohortName = "coad", logscale = TRUE, capture_size = 35.8)
2. 计算MATH
筛选CNV,SNV以及临床上共有的样本,最后获得419个样本进行后续分析。
samples = unique(getSampleSummary(coad)$Tumor_Sample_Barcode)
seg = seg[Sample %in% samples]
seg_samples = unique(seg[Sample %in% samples]$Sample)
length(seg_samples)
通过maftools软件包中的函数inferHeterogeneity很容易实现MATH的计算以及可视化,我们先来看下单个样本的分析。
library("mclust")
het = inferHeterogeneity(maf = coad, tsb = "TCGA-DM-A28C", vafCol = "t_vaf")
print(het$clusterMeans)
这时我们加入CNV,通过CNV数据的矫正去掉一些落入CNV区域的位点,如下:
segfile = "coad.seg.txt"
het = inferHeterogeneity(maf = coad, tsb = "TCGA-DM-A28C", vafCol = "t_vaf", segFile = segfile)
# Visualizing results. Highlighting those variants on copynumber altered
# variants.
plotClusters(clusters = het, genes = "CN_altered", showCNvars = TRUE)
遍历所有的样本,计算MATH并整理,如下:
outdir = "F:/demo script/基因组分析系列/PlotMATH/"
barcode <- seg_samples head(barcode) math <- data.frame() for (i in barcode) { out.math="inferHeterogeneity(maf" = coad, tsb="i," vafcol="t_vaf" , segfile="segfile)" tumor_sample_barcode="unique(out.math$clusterData$Tumor_Sample_Barcode)" m="unique(out.math$clusterData$MATH)" out="data.frame(Tumor_Sample_Barcode," m) out) } head(math) < code></->
3. 提取 MSIscore
MSI的数据直接在临床数据中获取即可,如下:
MSIdata <- clindata[, c(2, 29, 30, 57)] head(msidata) < code></->
4. 合并数据
三组数据都获得后,进行合并,并去掉缺失的样本,如下:
TMB_MATH <- merge(tmb, math, by="Tumor_Sample_Barcode" ) clin <- getclinicaldata(coad) tmb_math merge(tmb_math, msidata, head(tmb_math) < code></->
4. TMB,MATH,MSIscore相关性
通过数值比较,可以更直观地显示肿瘤异质性与肿瘤负荷和微卫星不稳定性之间的关系,如下:
[En]
The relationship between tumor heterogeneity and tumor load and microsatellite instability can be shown more intuitively by numerical comparison, as follows:
A. TMB与MATH相关性
TMB与MATH略微相关,显著性不高,几乎没有关系。
library(ggplot2)
# TMB与MATH
cor(tmb_math$total_perMB, tmb_math$m, method = "pearson")
cor.test(tmb_math$total_perMB, tmb_math$m, method = "pearson")[3]
p1 <- ggplot(tmb_math, aes(x="m," y="total_perMB))" + geom_point(size="1," shape="15," aes(color="MSIsensor.Score))" geom_smooth(method="lm)" xlab("math") ylab("tmb") annotate("text", x="40," label="r^2=-0.013 p=0.88" , size="4)" theme_bw() guides(fill="guide_colorbar(title" = "msi score")) p1 < code></->
B. TMB与MSI相关性
TMB与MSI正相关,并且非常显著!
cor(tmb_math$total_perMB, tmb_math$MSIsensor.Score, method = "pearson")
cor.test(tmb_math$total_perMB, tmb_math$MSIsensor.Score, method = "pearson")[3]
p2 <- ggplot(tmb_math, aes(x="MSIsensor.Score," y="total_perMB))" + geom_point(size="1," shape="15," aes(color="m))" geom_smooth(method="lm)" xlab("msi") ylab("tmb") annotate("text", x="20," label="r^2=0.546 p=6.617292e-11" , size="4)" theme_bw() guides(fill="guide_colorbar(title" = "math")) p2 < code></->
C. MSI与MATH相关性
MSI与MATH略微负相关性,显著性不高,几乎关系不大。
cor(tmb_math$m, tmb_math$MSIsensor.Score, method = "pearson")
cor.test(tmb_math$m, tmb_math$MSIsensor.Score, method = "pearson")[3]
p3 <- ggplot(tmb_math, aes(x="MSIsensor.Score," y="m))" + geom_point(size="1," shape="15," aes(color="total_perMB))" geom_smooth(method="lm)" xlab("msi") ylab("math") annotate("text", x="20," label="r^2=-0.127 p=0.16" , size="4)" theme_bw() guides(fill="guide_colorbar(title" = "tmb")) p3 < code></->
将三个结果组合一起,仔细观察:
library(patchwork)
p1 | p2 | p3
结果解读
从相关性结果上来看,TMB与MSI关系非常密切,而TMB与MATH异质性相关性不高,MSI同样与MATH相关性不高,但是这三个变量是否能作为COAD癌症的预后标志物,请听下次分解!
References:
- Ling S, Hu Z, Yang Z, et al. Extremely high genetic diversity in a single tumor points to prevalence of non-Darwinian cell evolution [published correction appears in Proc Natl Acad Sci U S A. 2016 Feb 2;113(5):E663]. Proc Natl Acad Sci U S A. 2015;112(47):E6496-E6505. doi:10.1073/pnas.1519556112
- Mroz EA, Rocco JW. MATH, a novel measure of intratumor genetic heterogeneity, is high in poor-outcome classes of head and neck squamous cell carcinoma. Oral Oncol. 2013;49(3):211-215. doi:10.1016/j.oraloncology.2012.09.007
Original: https://blog.csdn.net/weixin_41368414/article/details/125380966
Author: 桓峰基因
Title: DNA 9. 揭秘肿瘤异质性与TMB, MSI之间的相关性
相关阅读
Title: grpcio-1.41.1的安装以及排错记录(wheel的一大用处)
grpcio-1.41.1这个版本是比较难以安装的,如果你的操作系统是centos7的话,为什么这么说呢?因为它的安装报错是和gcc环境有关的。
首先,我的服务器是linux7版本,Python2.7环境,gcc版本是默认的4.8.5版本。grpcio的版本可查询到的最新版本就是1.41.1,如下图:
查询需要安装的版本可用版本有哪些,使用命令 pip install 软件包mingc==
root@centos1 ~]# pip install grpcio==
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
ERROR: Could not find a version that satisfies the requirement grpcio== (from versions: 0.4.0a0, 0.4.0a1, 0.4.0a2, 0.4.0a3, 0.4.0a4, 0.4.0a5, 0.4.0a6, 0.4.0a7, 0.4.0a8, 0.4.0a13, 0.4.0a14, 0.5.0a0, 0.5.0a1, 0.5.0a2, 0.9.0a0, 0.9.0a1, 0.10.0a0, 0.11.0b0, 0.11.0b1, 0.12.0b0, 0.13.0, 0.13.1rc1, 0.13.1, 0.14.0rc1, 0.14.0, 0.15.0, 1.0.0rc1, 1.0.0rc2, 1.0.0, 1.0.1rc1, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.1.3, 1.2.0, 1.2.1, 1.3.0, 1.3.3, 1.3.5, 1.4.0, 1.6.0, 1.6.3, 1.7.0, 1.7.3, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.6, 1.9.0rc1, 1.9.0rc2, 1.9.0rc3, 1.9.0, 1.9.1, 1.10.0rc2, 1.10.0, 1.10.1rc1, 1.10.1rc2, 1.10.1, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.11.1rc1, 1.11.1, 1.12.0rc1, 1.12.0, 1.12.1, 1.13.0rc1, 1.13.0rc2, 1.13.0rc3, 1.13.0, 1.14.0rc1, 1.14.0rc2, 1.14.0, 1.14.1, 1.14.2rc1, 1.14.2, 1.15.0rc1, 1.15.0, 1.16.0rc1, 1.16.0, 1.16.1, 1.17.0, 1.17.1, 1.18.0, 1.19.0, 1.20.0rc1, 1.20.0rc2, 1.20.0rc3, 1.20.0, 1.20.1, 1.21.0rc1, 1.21.1rc1, 1.21.1, 1.22.0rc1, 1.22.0, 1.22.1, 1.23.0rc1, 1.23.0, 1.23.1, 1.24.0rc1, 1.24.0, 1.24.1, 1.24.3, 1.25.0rc1, 1.25.0, 1.26.0rc1, 1.26.0, 1.27.0rc1, 1.27.0rc2, 1.27.1, 1.27.2, 1.28.0rc1, 1.28.0rc2, 1.28.1, 1.29.0, 1.30.0, 1.31.0, 1.32.0, 1.33.1, 1.33.2, 1.34.0rc1, 1.34.0, 1.34.1, 1.35.0rc1, 1.35.0, 1.36.0rc1, 1.36.0, 1.36.1, 1.37.0rc1, 1.37.0, 1.37.1, 1.38.0rc1, 1.38.0, 1.38.1, 1.39.0rc1, 1.39.0, 1.40.0rc1, 1.40.0, 1.41.0rc2, 1.41.0, 1.41.1)
ERROR: No matching distribution found for grpcio==
这里可以看到最高版本是1.41.1,但需要注意的是,这里表示的是Python2.7最高的可支持的grpcio的版本是1.41.1 ,如果是Python3比如3.8,那么,可支持的版本就更高了。3.8查询出的示例如下:
[root@slave2 ~]# pip install grpcio==
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
ERROR: Could not find a version that satisfies the requirement grpcio== (from versions: 0.4.0a0, 0.4.0a1, 0.4.0a2, 0.4.0a3, 0.4.0a4, 0.4.0a5, 0.4.0a6, 0.4.0a7, 0.4.0a8, 0.4.0a13, 0.4.0a14, 0.5.0a0, 0.5.0a1, 0.5.0a2, 0.9.0a0, 0.9.0a1, 0.10.0a0, 0.11.0b0, 0.11.0b1, 0.12.0b0, 0.13.0, 0.13.1rc1, 0.13.1, 0.14.0rc1, 0.14.0, 0.15.0, 1.0.0rc1, 1.0.0rc2, 1.0.0, 1.0.1rc1, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.1.3, 1.2.0, 1.2.1, 1.3.0, 1.3.5, 1.4.0, 1.6.0, 1.6.3, 1.7.0, 1.7.3, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.6, 1.9.0rc1, 1.9.0rc2, 1.9.0rc3, 1.9.0, 1.9.1, 1.10.0rc2, 1.10.0, 1.10.1rc1, 1.10.1rc2, 1.10.1, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.11.1rc1, 1.11.1, 1.12.0rc1, 1.12.0, 1.12.1, 1.13.0rc1, 1.13.0rc2, 1.13.0rc3, 1.13.0, 1.14.0rc1, 1.14.0rc2, 1.14.0, 1.14.1, 1.14.2rc1, 1.14.2, 1.15.0rc1, 1.15.0, 1.16.0rc1, 1.16.0, 1.16.1, 1.17.0, 1.17.1, 1.18.0, 1.19.0, 1.20.0rc1, 1.20.0rc2, 1.20.0rc3, 1.20.0, 1.20.1, 1.21.0rc1, 1.21.1rc1, 1.21.1, 1.22.0rc1, 1.22.0, 1.22.1, 1.23.0rc1, 1.23.0, 1.23.1, 1.24.0rc1, 1.24.0, 1.24.1, 1.24.3, 1.25.0rc1, 1.25.0, 1.26.0rc1, 1.26.0, 1.27.0rc1, 1.27.0rc2, 1.27.1, 1.27.2, 1.28.0rc1, 1.28.0rc2, 1.28.1, 1.29.0, 1.30.0, 1.31.0, 1.32.0, 1.33.1, 1.33.2, 1.34.0rc1, 1.34.0, 1.34.1, 1.35.0rc1, 1.35.0, 1.36.0rc1, 1.36.0, 1.36.1, 1.37.0rc1, 1.37.0, 1.37.1, 1.38.0rc1, 1.38.0, 1.38.1, 1.39.0rc1, 1.39.0, 1.40.0rc1, 1.40.0, 1.41.0rc2, 1.41.0, 1.41.1, 1.42.0rc1, 1.42.0, 1.43.0rc1, 1.43.0, 1.44.0rc1, 1.44.0rc2, 1.44.0, 1.45.0rc1, 1.45.0, 1.46.0rc1, 1.46.0rc2, 1.46.0, 1.46.1, 1.46.3)
ERROR: No matching distribution found for grpcio==
直接安装这个1.41.1可以吗?答案是否定的,必须先把gcc的版本升高到至少6才可以哦。
在gcc4.8下其中的一段报错如下:
-Ithird_party/boringssl-with-bazel/src/include -Ithird_party/upb -Isrc/core/ext/upb-generated -Isrc/core/ext/upbdefs-generated -Ithird_party/xxhash -Ithird_party/zlib -I/usr/include/python2.7 -c src/core/ext/upb-generated/udpa/annotations/migrate.upb.c -o python_build/temp.linux-x86_64-2.7/src/core/ext/upb-generated/udpa/annotations/migrate.upb.o -std=c++11 -std=gnu99 -fvisibility=hidden -fno-wrapv -fno-exceptions -pthread
cc1: warning: command line option '-std=c++11' is valid for C++/ObjC++ but not for C [enabled by default]
cc1: warning: command line option '-std=c++11' is valid for C++/ObjC++ but not for C [enabled by default]
src/python/grpcio/grpc/_cython/cygrpc.cpp: In function 'PyObject* __pyx_pw_4grpc_7_cython_6cygrpc_7Channel_9segregated_call(PyObject*, PyObject*, PyObject*)':
src/python/grpcio/grpc/_cython/cygrpc.cpp:18702:76: warning: '__pyx_v_c_completion_queue' may be used uninitialized in this function [-Wmaybe-uninitialized]
其中,cc1: warning: command line option '-std=c++11' is valid for C++/ObjC++ but not for C [enabled by default]是提示gcc版本不够。
还有一段报错如下:
Cython-generated files are missing...
We could not find Cython. Setup may take 10-20 minutes.
这个就是单纯的提示没有安装Cython , 程序将会跑10到20分钟。
解决方案:
安装Cython,临时提升gcc版本到6即可。
执行命令:pip install Cython
root@centos1 ~]# tar xf gcc-6.tar
[root@centos1 ~]# mkdir /opt/rh
[root@centos1 ~]# mv devtoolset-6 /opt/rh/
[root@centos1 ~]# source /opt/rh/devtoolset-6/enable
[root@centos1 ~]#
[root@centos1 ~]# pip install grpcio==1.41.1
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Collecting grpcio==1.41.1
Downloading http://mirrors.aliyun.com/pypi/packages/bd/81/6c704c002a992b9d6466c739e3e7687e0bb2365d8cd63d7fc8e95d502cb6/grpcio-1.41.1.tar.gz (21.2 MB)
|████████████████████████████████| 21.2 MB 11.6 MB/s
Requirement already satisfied: six>=1.5.2 in /usr/lib/python2.7/site-packages (from grpcio==1.41.1) (1.16.0)
Requirement already satisfied: enum34>=1.0.4 in /usr/lib/python2.7/site-packages (from grpcio==1.41.1) (1.1.10)
Requirement already satisfied: futures>=2.2.0 in /usr/lib/python2.7/site-packages (from grpcio==1.41.1) (3.3.0)
Building wheels for collected packages: grpcio
Building wheel for grpcio (setup.py) ... done
Created wheel for grpcio: filename=grpcio-1.41.1-cp27-cp27mu-linux_x86_64.whl size=38482692 sha256=f739d6dc50b9d9566757accdbaa2c2dfe3bceeabc7134c6767e3b2f9d870a452
Stored in directory: /root/.cache/pip/wheels/c7/ed/27/f189d34b2e7c42eb5e9ffd14fbe2cad21efe7502a5d7516d27
Successfully built grpcio
Installing collected packages: grpcio
Attempting uninstall: grpcio
Found existing installation: grpcio 1.37.1
Uninstalling grpcio-1.37.1:
Successfully uninstalled grpcio-1.37.1
Successfully installed grpcio-1.41.1
上面我使用了wheel自动构造轮子,轮子文件生成在了这个提示的地方:
Stored in directory: /root/.cache/pip/wheels/c7/ed/27/f189d34b2e7c42eb5e9ffd14fbe2cad21efe7502a5d7516d27
我的轮子的版本:
[root@centos1 ~]# pip list |grep wheel
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
wheel 0.36.2
那么,这个新生成的文件有什么用处呢?其实既然叫轮子,那么,表达的意思就是这个文件可以在其它的任意的centos7系列操作系统下使用,直接pip install 轮子文件就可以安装好了,不需要高版本的gcc啦(依赖还是需要的 ,依赖是三个Requirement already satisfied: six>=1.5.2 in /usr/lib/python2.7/site-packages (from grpcio==1.41.1) (1.16.0)
Requirement already satisfied: enum34>=1.0.4 in /usr/lib/python2.7/site-packages (from grpcio==1.41.1) (1.1.10)
Requirement already satisfied: futures>=2.2.0 in /usr/lib/python2.7/site-packages (from grpcio==1.41.1) (3.3.0))。
如果没有安装wheel,那么,将不会生成wheel文件,也就是不会有如下提示,此时的安装应该是这样的:
[root@centos1 ~]# pip install grpcio==1.40
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Collecting grpcio==1.40
Downloading http://mirrors.aliyun.com/pypi/packages/37/56/700ff83b59eb69a7ddd62840666699173923020cfdf33a2860b9eba5667a/grpcio-1.40.0.tar.gz (21.3 MB)
|████████████████████████████████| 21.3 MB 12.3 MB/s
Requirement already satisfied: six>=1.5.2 in /usr/lib/python2.7/site-packages (from grpcio==1.40) (1.16.0)
Requirement already satisfied: enum34>=1.0.4 in /usr/lib/python2.7/site-packages (from grpcio==1.40) (1.1.10)
Requirement already satisfied: futures>=2.2.0 in /usr/lib/python2.7/site-packages (from grpcio==1.40) (3.3.0)
Using legacy 'setup.py install' for grpcio, since package 'wheel' is not installed.
Installing collected packages: grpcio
Attempting uninstall: grpcio
Found existing installation: grpcio 1.41.1
Uninstalling grpcio-1.41.1:
Successfully uninstalled grpcio-1.41.1
Running setup.py install for grpcio ...
也就是Using legacy 'setup.py install' for grpcio, since package 'wheel' is not installed,然后直接安装了,那么,你如果需要移植这个库,在别的服务器上将需要重新激活gcc6,然后重复安装步骤啦,如果有轮子,只需要将轮子文件grpcio-1.41.1-cp27-cp27mu-linux_x86_64.whl 拷贝到其它服务器上,安装它就可以了,可以省很多的时间和精力,非常的方便快捷。
Original: https://blog.csdn.net/alwaysbefine/article/details/124917333
Author: zsk_john
Title: grpcio-1.41.1的安装以及排错记录(wheel的一大用处)

基于C++和Python实现的手写信息识别

【人脸识别】基于facenet_pytorch实现人脸识别

深圳大学移动互联网应用期末大作业——垃圾分类app

Android studio加载语音识别libpocketsphinx_jni.so库文件
![[nlp] 自动文摘评测 Rouge-1、Rouge-2、Rouge-L、Rouge-S](https://www.itcode1024.com/wp-content/themes/begin/prune.php?src=https://www.itcode1024.com/wp-content/themes/begin/img/loading.png&w=280&h=210&a=&zc=1)
[nlp] 自动文摘评测 Rouge-1、Rouge-2、Rouge-L、Rouge-S

tensorflow-gpu安装过程中出现的tf.test.is_gpu_avaiable()返回false的一部分解决方法

业界首个声纹识别与音频检索系统上线,10分钟搭建产业级应用

研究生语音识别课程作业记录(三) 非特定人孤立词识别

从环境搭建到回归神经网络案例,带你掌握Keras

CMOS图像传感器——图像传感器噪声

c语言实现语音检测vad_语音特征小结

通信类会议期刊论文相关

目标检测算法的分类和优缺点

TensorFlow2.0中报错:No module named ‘tensorflow.examples’,解决方法
