背景
JCVI不需要介绍了,唐海宝老师开发的python环境下的比较基因组学分析可视化利器。在依赖中可以看到需要matplotlib
, 这哥们好像需要LaTeX
,如果不装LaTeX
,肯定会报错。
问题
macOS上安装LaTeX一般会发现到处推荐安装MacTex-Tuna镜像-点击下载4.5个G..装完7个G....巨大无比ಥ_ಥ。
- 第一次在我的mbp13上试了下(catalina 10.15.3)当时报错,说没装上
LaTeX
. 然后我就开始各种尝试,首先装了MacTex
,结果还是报错,然后我就用conda专门为JCVI
建了新环境重新尝试,还是失败。然后到唐老师github issue留言了遇到的问题,唐老师建议装完LaTeX
后在terminal运行一下
latex --help
issue 回应
@DieTANG
You are missing LaTex, which can be installed [here]
(https://www.latex-project.org/get/).
@ShawnWx2019
Not sure what the problem is but that's what you need. You should be able to runlatex --help
in your terminal after installation, otherwise, the plotting will not work.
Matplotlib's LaTeX support requires a working LaTeX installation, dvipng (which may be included with your LaTeX installation), and Ghostscript (GPL Ghostscript 9.0 or later is required). The executables for these external dependencies must all be located on your PATH.
Haibao
果然,我尝试了latex --help
后啥也没有发生,那么MacTex
应该有问题...
奇葩解决方法
我想了下不如卸载了重装以下看看,于是根据这位老哥完全卸载MacTex一顿sudo rm -rf
卸载干净了,然后重装MacTex
居然work了。
写在最后
目前不知道是什么原理,今天在nuc8下搞得黑苹果试了下也是这么解决的,变量很多,我目前两个电脑情况如下:
- 都装了miniconda,也写进了环境变量,Jimmy大佬曾说过可能会污染环境变量,不知道是不是这个原因。
- mac都是10.15,不知道之前的版本怎么样。