Skip to main content

Python repackaging of the MEDCoupling library

Project description


travis pypi

This repository provides a Python repackaging of the latest version (9.4.0) of the MEDCoupling library via a Python file and hence installable via pip.

The initial purpose of this redistribution is to mainly use the remapping algorithms of MEDCoupling (see pymapping and paraview-mapping). Hence the following MEDCoupling functionalities are NOT supported

  • MED file reading/writing via MEDLoader, so the MED-file library is not required (MEDCOUPLING_MICROMED=ON)
  • Parallel functionalities (MEDCOUPLING_ENABLE_PARTITIONER=OFF)
  • Renumbering (MEDCOUPLING_ENABLE_RENUMBER=OFF), which depends on boost


The version of this package (on PyPI) follows that of MEDCoupling. For MEDCoupling 9.4.0 for instance, we use

v9.4.0r1, v9.4.0r2, ...

to designate all PyPI releases based on MEDCoupling 9.4.0. The suffix r[x] is included (abusively, since according to PEP 440 it is for post releases) for possible bug fixes coming from this package.

Installation from PyPI

To install MEDCoupling, you can now simply use the binary wheels available on PyPI

pip install -U medcoupling

Binary Python 3.7 wheels are available for 64-bit Windows (win_amd64), Linux-like platforms (manylinux2010_x86_64) and macOS (macosx_10_11_x86_64).

To assure that MEDCoupling is well installed, try importing it in your Python

import medcoupling  # should not raise error

Building from source

Running python install or pip install . will

  1. Download the source code of MEDCoupling from
  2. Build the C++ / Python libraries using cmake and swig
  3. Distribute and install generated files using setuptools

The building process has been tested under Windows 10 with Visual Studio 2017, under Ubuntu 18.04 with gcc 7.4, under the manylinux2010 platform and under macOS 10.15.

Uploading to PyPI

To upload source and binary wheels to PyPI, type

# Source
python sdist

# Binary on Windows
python bdist_wheel --plat-name win_amd64

# Binary on Linux
python3 bdist_wheel --plat-name manylinux1_x86_64

# Binary on macOS
python3 bdist_wheel --plat-name macosx_10_11_x86_64

# Upload to PyPI
python -m twine upload dist/*


MEDCoupling, and hence this repository are published under LGPL 2.1.

Repository author

Tianyi Li

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for medcoupling, version 9.4.0.post1
Filename, size File type Python version Upload date Hashes
Filename, size medcoupling-9.4.0.post1-cp37-cp37m-macosx_10_11_x86_64.whl (7.9 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size medcoupling-9.4.0.post1-cp37-cp37m-manylinux2010_x86_64.whl (8.8 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size medcoupling-9.4.0.post1-cp37-cp37m-win_amd64.whl (3.9 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size medcoupling-9.4.0.post1.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page