How do in install chempy on Linux using miniconda?

Viewed 37

Tried to install chempy on Linux as described in the documentation:

conda create -n chempy python=3.9
conda activate chempy
conda install -c bjodah chempy pytest 

This resulted in the following error message.

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - chempy -> python[version='2.7.*|3.5.*|3.6.*|3.4.*']

Switching to python version 3.6 didn't help either, as some packages explicitly demand 3.9 or higher.

System specification:

  • Operating system: Ubuntu 20.04.2 LTS
  • Miniconda version: 4.10.1
  • Python: 3.9
1 Answers

Unfortunately, the chempy conda package is not complete, nor is the pip package. The only way it works seems to be to install dependencies manually from separate sources.

  1. Install miniconda, create a separate environment and activate it:
conda create -n "chempy" python=3.9
conda activate chempy
  1. Install dependencies
conda install -c anaconda boost
conda install -c conda-forge gsl
conda install -c conda-forge pycvodes
conda install -c conda-forge sundials
  1. Now you can install chempy:
python3 -m pip install chempy[all]
  1. Test your installation:
python3 -m pytest -rs -W \
ignore::chempy.ChemPyDeprecationWarning --pyargs \
chempy > test.out

The following tests will fail but chempy works nonetheless:

kinetics/tests/test__native.py FF..FFFFFF                                [  3%]
...
util/tests/test_table.py ..FFF                                           [100%]

System specification:

  • Operating systems: Ubuntu 20.04.2 LTS, Debian 10.9 (both 64-Bit-PC)
  • Miniconda version: 4.10.1
  • Python: 3.9

Note for Windows users:

Not all dependencies are available for Windows, so it's not possible to install chempy on Windows. I recommend installing it in a virtual machine such as Virtual Box or wsl (not tested).

Related