1. Installation

The installation of PySpice by itself is quite simple. However it will be easier to get the dependencies on a Linux desktop.

1.1. Dependencies

PySpice requires the following dependencies:

Also it is recommanded to have these Python modules:

For development, you will need in addition:

  • Sphinx
  • circuit_macros and a LaTeX environment

1.2. Ngspice Compilation

Usually Ngspice is available as a package in the major Linux distributions. But I recommend to check the compilation options before to use it extensively. For example the Fedora package enables too many experimental codes that have side effects. The recommended way to compile Ngspice is given in the manual and the INSTALLATION file. Ngspice is an example of complex software where we should not enable everything without care.

Warning

For the following, the compilation option –enable-ndev is known to broke the server mode.

1.3. Installation from PyPi Repository

PySpice is made available on the PyPI repository at https://pypi.python.org/pypi/PySpice

Run this command to install the last release:

pip install PySpice

1.4. Installation from Source

The PySpice source code is hosted at https://github.com/FabriceSalvaire/PySpice

To clone the Git repository, run this command in a terminal:

git clone git@github.com:FabriceSalvaire/PySpice.git

Then to build and install PySpice run these commands:

python setup.py build
python setup.py install