amepproject / amep

The Active Matter Evaluation Package (AMEP) - a Python library for the analysis of particle-based and continuum simulation data of soft and active matter systems
https://amepproject.de/
GNU General Public License v3.0
9 stars 2 forks source link

BUG: distutils - incompatibility with Python 3.12 #15

Closed hechtprojects closed 3 months ago

hechtprojects commented 3 months ago

Description:

The distutils library is used in the module amep.plot but is not part of Python 3.12 anymore. Therefore, using AMEP within Python 3.12 raises an error.

Code for reproduction:

import amep

Error message:

image

Python and AMEP versions:

python 3.12 amep 1.0.0

Additional information:

Solution:

  1. Replace from distutils.spawn import find_executable with from shutil import which.

  2. Replace if find_executable('latex'): with if which('latex'):.

How did you install AMEP?

pip

hechtprojects commented 3 months ago

This bug is fixed now. The fix will be part of patch release v1.0.1.