2

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?

tlk13
  • 113
  • 5

2 Answers2

4

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.

merv
  • 67,214
  • 13
  • 180
  • 245
  • Thank you so much for your answer!!! Only thing I now have to figure out is why it works in terminal and not in tmux.. – tlk13 Jan 12 '22 at 12:30
  • 1
    @tlk13 yeah `tmux` + `conda` is a whole other thing. I abandoned `tmux` years ago for `screen` simply because it mucks around with the `PATH` in ways that interfere with Conda functionality. Workarounds can be found through searching, either here or SuperUser or Unix SE sites. – merv Jan 12 '22 at 17:47
  • nice, thanks. never been a huge fan of tmux either way, my former tutor recommended it to me and I just went with it. but will try out screen then! – tlk13 Jan 12 '22 at 18:53
0

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

Alec Jacobson
  • 6,032
  • 5
  • 51
  • 88