Installation¶
Requirements¶
Lcapy requires the following Python packages: scipy, sympy, numpy, matplotlib, networkx. These are automatically loaded when using pip.
For schematic drawing you require:
pdflatex
CircuiTikZ (https://www.ctan.org/pkg/circuitikz or https://circuitikz.github.io/circuitikz/). Unfortunately, different CircuiTikZ releases subtly tweak component sizes. It is easiest to download Circuitikz as a single file from https://circuitikz.github.io/circuitikz/ and install on your LaTeX inputs path. If using circuitikzgit.sty rename to circuitikz.sty.
Ghostscript (http://www.ghostscript.com/), ImageMagick (http://www.imagemagick.org/), or pdftoppm
For nice maths formatting in a Jupyter notebook you require mathjax (https://www.mathjax.org/). This is not essential; if it is not loaded then an active internet connection is required.
Installation for Linux¶
Lcapy (and its Python dependencies) can be installed using:
$ pip3 install lcapy
For systems using apt, all the other packages required for Lcapy can be installed using:
$ sudo apt install ghostscript texlive-latex-extra cm-super
If you wish to use schtex ensure that ~/.local/bin is on your path.
Installation for macOS¶
Lcapy (and its Python dependencies) can be installed using:
$ pip3 install lcapy
Using Homebrew (https://brew.sh), all the other packages required for Lcapy can be installed using:
$ brew install mactex
or to minimise disk space, install a smaller set of LaTeX packages using:
$ brew install basictex
$ eval "$(/usr/libexec/path_helper)"
$ sudo tlmgr install collection-latexextra
Installation for Windows¶
Lcapy (and its Python dependencies) can be installed using:
$ pip3 install lcapy
To install ghostscript see https://www.ghostscript.com/download/gsdnld.html
Download circuitikz (https://www.ctan.org/pkg/circuitikz)
Installation of latest version¶
If you wish to install the latest version from the git repository use:
$ pip install git+https://github.com/mph-/lcapy.git#egg=lcapy
However, it is better to fork or clone the git repository if you wish to make fixes.
Installation for development¶
Install Lcapy’s dependencies as per instructions for your platform
Download Lcapy sources from https://github.com/mph-/lcapy as a .zip file or preferably using git:
$ git clone https://github.com/mph-/lcapy
Install Lcapy using:
$ cd lcapy
$ pip3 install --editable .[test,release]
For building the docs you need sphinx, ipython and pycairo. For example, using apt:
$ sudo apt-get install gir1.2-gtk-3.0 python3-gi python3-gi-cairo
$ pip3 install --editable .[doc]
For debugging schematic graphs dot is required:
$ sudo apt install graphviz
To run style guide checking locally
$ pip3 install flake8 flake8-bugbear flake8-requirements flake8-comprehensions
To run unit tests
$ pip3 install pytest
For coverage analysis
$ pip3 install coverage