How do I use openmesh and igl libraries in Python if both are not available for python2.7 or python3.9?

Question:

I have been trying to use some code which is uses openmesh and igl libraries.

Unfortunately, the only way to install igl I found was via conda into its Python 3.9 environment (conda install -c conda-forge igl). Openmesh on the other hand I could only install via outdated pip 20.x into Python 2.7 (pip install openmesh).

How could I use code, which necessitates both libraries? Is there an easy way to import the methods from one of the two libraries into either Python 2.7 or 3.9 environment?

Asked By: tlk13

||

Answers:

First, openmesh on Conda Forge refers to the OpenMesh software, which is not equivalent to the Python bindings (openmesh on PyPI). The latter goes by openmesh-python on Conda Forge and has builds for Python 2.7, 3.6, and 3.7.

Second, I wouldn’t recommend trying to install into an existing environment. Rather, specify exactly the packages that you require and let Conda resolve the dependency versions.

Using the command:

conda create -n foo -c conda-forge igl openmesh-python

solves without issue for me, and results in a Python 3.7 environment that can have both igl and openmesh installed.

Answered By: merv

Libigl is now also available on pip. It has wheels for a variety of python3 and it seems now the openmesh wheels on pypi also support python3

Answered By: Alec Jacobson