Question
How can I modify my environment yaml (for a python setup) environment.yml
, to automatically install xelatex
on Ubuntu?
Context
Currently my yaml consists of:
name: space
channels:
- conda-forge
- conda
dependencies:
- anaconda
- nb_conda
- conda:
- numpy>=1.19
- pytest>=3.0,<3.8
- notebook
- jupyter
- nbconvert
- matplotlib
- ipykernel
- tudatpy
- nb_conda
- scipy
- pip
- pip:
- pdflatex
- testbook
- pyment
- pdoc3
- black
Which can be installed with:
conda env create --file environment.yml
and updated with:
conda env update --file environment.yml
And when I try to convert a jupyter notebook to pdf, the notebook throws the error nbconvert failed: xelatex not found on PATH,
because xelatex is not installed (and added to PATH). According to this documentation, one can solve that, on Ubuntu platforms, with:
sudo apt-get install texlive-xetex texlive-fonts-recommended texlive-generic-recommended
However, that is an additional manual step which is something I would like to avoid. How could I modify the environment.yml
to do that?
Tangential: I was able to install it in the .travis.yml
with:
before_install:
- sudo apt-get update -qq
- sudo apt-get install texlive-xetex texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra texlive-science
However that is something else than the environment.yml
.