Skip to content

(2022-09-20) Lab Notebook: PyMesh installation with Conda

Warning

This is as a Lab Notebook which describes how to solve a specific problem at a specific time. Please keep this in mind as you read and use the content. Please pay close attention to the date, version information and other details.

Lab Notebook --- Installing PyMesh on HPCC using Conda (2022-09-20)

PyMesh is a code base developed by Qingnan Zhou for his PhD research at New York University. It is a rapid prototyping platform focused on geometry processing. PyMesh is written with both C++ and Python, where computational intensive functionalities are realized in C++, and Python is used for creating minimalistic and easy to use interfaces. Documentation for AntiSMASH can be found at https://github.com/PyMesh/PyMesh, but you will need to follow the instruction below to install AntiSMASH in your home directory on HPCC.

If you have not installed Anaconda in you home directory, see https://docs.icer.msu.edu/Using_conda/

Installing Pymesh

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Clear modules and load Anaconda
module purge
module load Conda/3

# You need to create a conda environment with an older version of python
conda create -n pymesh python=3.6

# Activate the environment
conda activate pymesh

# Use the the 0.2.1 version because the 0.3 version on conda forge required
# GLIBC 2.18 which is incompatible with the version (2.17) on HPCC (Centos7 thing I think)
conda install pymesh2=0.2.1

# Once done, test by trying to do 'import pymesh' in python

Why not Pymesh 0.30

The version of Pymesh 0.3 on conda forge produces the following error when I try to import pymesh

1
ImportError: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /mnt/home/panchyni/anaconda3/envs/pymesh/lib/python3.6/site-packages/pymesh/lib/libstdc++.so.6)

As far as I understand it, the GLIBC version is tied to the OS, so its not a s simple as importing another library. If for some reason version 0.3 is required, there are a couple of options, though they may be time consuming:

  • Build PyMesh from source using the files from the github. There are a number of dependencies, so you might want to see if you can use a conda environment to install the dependencies
  • Create a conda environment within an Singularity container of Centos8