Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jcvi.compara.catalog ortholog latex ERROR `type1cm.sty' not found #543

Closed
renmiaozhen opened this issue Feb 16, 2023 · 3 comments
Closed

Comments

@renmiaozhen
Copy link

When I run this command python3 -m jcvi.compara.catalog ortholog Rh Rp --no_strip_names, there is a warning :

[04:46:35 PM] INFO savefig failed. Reset usetex to False.
latex was not able to process the following string:
b'lp'

                   Here is the full command invocation and its output:

                   latex -interaction=nonstopmode --halt-on-error ../95351ae5a84b63591c3ae6c24552b04f.tex

                   This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)
                    restricted \write18 enabled.
                   entering extended mode
                   (../95351ae5a84b63591c3ae6c24552b04f.tex
                   LaTeX2e <2011/06/27>
                   Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, lo
                   aded.
                   (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
                   Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
                   (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
                   (/usr/share/texlive/texmf-dist/tex/latex/psnfss/helvet.sty
                   (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty))

                   ! LaTeX Error: File `type1cm.sty' not found.

                   Type X to quit or <RETURN> to proceed,
                   or enter new name. (Default extension: sty)

                   Enter file name:
                   ! Emergency stop.
                   <read *>

                   l.8 \usepackage
                                  {type1ec}^^M
                   No pages of output.
                   Transcript written on 95351ae5a84b63591c3ae6c24552b04f.log.

I find your previous answer about this question that sudo apt-get install dvipng texlive-latex-extra texlive-fonts-recommended , but my linux is CENTOS7. So What should I do ?

Hope your answer!

@Adamtaranto
Copy link
Collaborator

Hi @renmiaozhen,

Do you know which version of latex you have installed? The texlive-core package installed via conda seems to be the root of many of these pdfTeX errors.

Your issue may have been solved here. In short, uninstall any existing version of texlive and reinstall using apt.

# On CentOS you might need to install apt first (haven't tested this)
yum install apt

# Update package index and install texlive
sudo apt update
sudo apt install texlive texlive-latex-extra texlive-fonts-recommended dvipng cm-super

# Install the python bindings for latex
pip install latex

Let me know if that works.
Good luck!

@renmiaozhen
Copy link
Author

renmiaozhen commented Feb 22, 2023

Excitedly, I finally settled this bug! During the command running, I received another warning: I can't find the format file `latex.fmt'! and Can't locate mktexlsr.pl in @inc.

So, I run this command: which latex, the path is in my miniconda3: /miniconda3/envs/jcvi/bin/latex, but I can't uninstall this latex, because conda report errors: PackagesNotFoundError: The following packages are missing from the target environment. Therefore, I Manually deleted the latex-related files in this path /miniconda3/envs/jcvi/bin/. Now, I run the command which latex,it is under the textlive/bin/x86_64-linux/.

At the same time, I install the texlive following the website https://www.tug.org/texlive/quickinstall.html

  1. build a new folder named tmp/, and cd tmp/
  2. wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz (this process may be interrupted, you need to try again until complement)
  3. zcat install-tl-unx.tar.gz | tar xf -
  4. cd install-tl-*
  5. perl install-tl
  6. during the installation, there are some options given to you, you just need to input the D, and next input 1, and input your target path that you want to install (because I'm not the root, so I need to change the install path), input I start installation to hard disk
  7. installation starts, you need to wait patiently, the process will last about 1h or more time
  8. end of the installation, there are tips: add your path/texmf-dist/doc/man to MANPATH., add your path/texmf-dist/doc/info to INFOPATH., add your path/bin/x86_64-linux. You need to add these paths to your .bashrc, and run source .bashrc

Eventually, this issue was solved.
This process mostly references this link: https://www.jianshu.com/p/a5e9ca5886a4, you can also visit this link to solve your issues.

@Adamtaranto Adamtaranto changed the title jcvi.compara.catalog ortholog ERROR jcvi.compara.catalog ortholog latex ERROR `type1cm.sty' not found Feb 22, 2023
@Adamtaranto
Copy link
Collaborator

Thanks for the detailed summary of how you solved the issue. Looks like installing the full version of texlive provides essential files that are missing from other distributions.

Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants