# Errors when building Pylith on cluster

**URL:** <https://community.geodynamics.org/t/errors-when-building-pylith-on-cluster/1720>\
**Category:** PyLith\
**Tags:** installation\
**Created:** [March 10, 2021, 12:35am UTC](https://community.geodynamics.org/t/errors-when-building-pylith-on-cluster/1720 "2021-03-10T00:35:51Z")\
**Posts on this page:** 14\
**Page:** 2

<div class="post-metadata">

**Author:** ![baagaard](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/baagaard/32/615_2.png) [@baagaard](https://community.geodynamics.org/u/baagaard)\
**Post date:** [April 8, 2021, 4:24pm UTC](https://community.geodynamics.org/t/errors-when-building-pylith-on-cluster/1720/21 "2021-04-08T16:24:16Z")

</div>

I have addressed problems with building the `h5py` and `netCDF4` Python packages. I patched the installer to install `Cython` version 0.29.16 and `cftime` version 1.1.1. You can download the installer `pylith-installer-2.2.2-1.tgz` from the [PyLith Installer releases page](https://github.com/geodynamics/pylith_installer/releases/download/v2.2.2-0/).

---

<div class="post-metadata">

**Author:** ![marcontk](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/marcontk/32/922_2.png) [@marcontk](https://community.geodynamics.org/u/marcontk)\
**Post date:** [November 14, 2021, 6:46pm UTC](https://community.geodynamics.org/t/errors-when-building-pylith-on-cluster/1720/22 "2021-11-14T18:46:18Z")

</div>

Hi Brad,

```
    I am trying to compile pylith on macOS 10.13.6 with source version 2.2.2-1 which resolves the openssl bug shown in the discussion above.
    Now I get the following error ...

```

creating build/bdist.macosx-10.13-x86\_64/egg/EGG-INFO  
copying setuptools.egg-info/PKG-INFO → build/bdist.macosx-10.13-x86\_64/egg/EGG-INFO  
copying setuptools.egg-info/SOURCES.txt → build/bdist.macosx-10.13-x86\_64/egg/EGG-INFO  
copying setuptools.egg-info/dependency\_links.txt → build/bdist.macosx-10.13-x86\_64/egg/EGG-INFO  
copying setuptools.egg-info/entry\_points.txt → build/bdist.macosx-10.13-x86\_64/egg/EGG-INFO  
copying setuptools.egg-info/requires.txt → build/bdist.macosx-10.13-x86\_64/egg/EGG-INFO  
copying setuptools.egg-info/top\_level.txt → build/bdist.macosx-10.13-x86\_64/egg/EGG-INFO  
copying setuptools.egg-info/zip-safe → build/bdist.macosx-10.13-x86\_64/egg/EGG-INFO  
creating dist  
creating ‘dist/setuptools-39.1.0-py2.7.egg’ and adding ‘build/bdist.macosx-10.13-x86\_64/egg’ to it  
removing ‘build/bdist.macosx-10.13-x86\_64/egg’ (and everything under it)  
Creating /Users/cyclo/pylith/lib/python2.7/site-packages/site.py  
Processing setuptools-39.1.0-py2.7.egg  
Copying setuptools-39.1.0-py2.7.egg to /Users/cyclo/pylith/lib/python2.7/site-packages  
Adding setuptools 39.1.0 to easy-install.pth file  
Installing easy\_install script to /Users/cyclo/pylith/bin  
Installing easy\_install-2.7 script to /Users/cyclo/pylith/bin

Installed /Users/cyclo/pylith/lib/python2.7/site-packages/setuptools-39.1.0-py2.7.egg  
Processing dependencies for setuptools==39.1.0  
Finished processing dependencies for setuptools==39.1.0  
/Users/cyclo/Pylith222\_1/src/pylith/pylith-installer-2.2.2-1/bin/fetch.sh “/opt/local/bin/curl -L -O -o” numpy-1.14.3.tar.gz [Index of /~buildbot/deps](http://geoweb.cse.ucdavis.edu/~buildbot/deps)  
Downloading numpy-1.14.3.tar.gz from [Index of /~buildbot/deps](http://geoweb.cse.ucdavis.edu/~buildbot/deps).  
 Total Received % Xferd Average Speed Time Time Time Current  
Dload Upload Total Spent Left Speed  
100 4267k 100 4267k 0 0 1585k 0 0:00:02 0:00:02 --:–:-- 1589k  
/usr/bin/tar -zxf numpy-1.14.3.tar.gz  
cd numpy-1.14.3 &&   
/Users/cyclo/pylith/bin/python setup.py install --prefix=/Users/cyclo/pylith &&   
touch /Users/cyclo/Pylith222\_1/installed\_numpy  
Running from numpy source directory.

Note: if you need reliable uninstall behavior, then install  
with pip instead of using `setup.py install`:

- `pip install .` (from a git repo or downloaded source  
release)
- `pip install numpy` (last NumPy release on PyPi)

ERROR:root:code for hash md5 was not found.  
Traceback (most recent call last):  
File “/Users/cyclo/pylith/lib/python2.7/hashlib.py”, line 147, in   
globals()[\_\_func\_name] = \_\_get\_hash(\_\_func\_name)  
File “/Users/cyclo/pylith/lib/python2.7/hashlib.py”, line 97, in \_\_get\_builtin\_constructor  
raise ValueError('unsupported hash type ’ + name)  
ValueError: unsupported hash type md5  
ERROR:root:code for hash sha1 was not found.  
Traceback (most recent call last):  
File “/Users/cyclo/pylith/lib/python2.7/hashlib.py”, line 147, in   
globals()[\_\_func\_name] = \_\_get\_hash(\_\_func\_name)  
File “/Users/cyclo/pylith/lib/python2.7/hashlib.py”, line 97, in \_\_get\_builtin\_constructor  
raise ValueError('unsupported hash type ’ + name)  
ValueError: unsupported hash type sha1  
ERROR:root:code for hash sha224 was not found.  
Traceback (most recent call last):  
File “/Users/cyclo/pylith/lib/python2.7/hashlib.py”, line 147, in   
globals()[\_\_func\_name] = \_\_get\_hash(\_\_func\_name)  
File “/Users/cyclo/pylith/lib/python2.7/hashlib.py”, line 97, in \_\_get\_builtin\_constructor  
raise ValueError('unsupported hash type ’ + name)  
ValueError: unsupported hash type sha224  
ERROR:root:code for hash sha256 was not found.  
Traceback (most recent call last):  
File “/Users/cyclo/pylith/lib/python2.7/hashlib.py”, line 147, in   
globals()[\_\_func\_name] = \_\_get\_hash(\_\_func\_name)  
File “/Users/cyclo/pylith/lib/python2.7/hashlib.py”, line 97, in \_\_get\_builtin\_constructor  
raise ValueError('unsupported hash type ’ + name)  
ValueError: unsupported hash type sha256  
ERROR:root:code for hash sha384 was not found.  
Traceback (most recent call last):  
File “/Users/cyclo/pylith/lib/python2.7/hashlib.py”, line 147, in   
globals()[\_\_func\_name] = \_\_get\_hash(\_\_func\_name)  
File “/Users/cyclo/pylith/lib/python2.7/hashlib.py”, line 97, in \_\_get\_builtin\_constructor  
raise ValueError(‘unsupported hash type ’ + name)  
ValueError: unsupported hash type sha384  
ERROR:root:code for hash sha512 was not found.  
Traceback (most recent call last):  
File “/Users/cyclo/pylith/lib/python2.7/hashlib.py”, line 147, in   
globals()[\_\_func\_name] = \_\_get\_hash(\_\_func\_name)  
File “/Users/cyclo/pylith/lib/python2.7/hashlib.py”, line 97, in \_\_get\_builtin\_constructor  
raise ValueError(‘unsupported hash type ’ + name)  
ValueError: unsupported hash type sha512  
Traceback (most recent call last):  
File “setup.py”, line 394, in   
setup\_package()  
File “setup.py”, line 386, in setup\_package  
setup(\*\*metadata)  
File “/Users/cyclo/Pylith222\_1/numpy-1.14.3/numpy/distutils/core.py”, line 135, in setup  
config = configuration()  
File “setup.py”, line 166, in configuration  
config.add\_subpackage(‘numpy’)  
File “/Users/cyclo/Pylith222\_1/numpy-1.14.3/numpy/distutils/misc\_util.py”, line 1024, in add\_subpackage  
caller\_level = 2)  
File “/Users/cyclo/Pylith222\_1/numpy-1.14.3/numpy/distutils/misc\_util.py”, line 993, in get\_subpackage  
caller\_level = caller\_level + 1)  
File “/Users/cyclo/Pylith222\_1/numpy-1.14.3/numpy/distutils/misc\_util.py”, line 930, in \_get\_configuration\_from\_setup\_py  
config = setup\_module.configuration(\*args)  
File “numpy/setup.py”, line 10, in configuration  
config.add\_subpackage(‘core’)  
File “/Users/cyclo/Pylith222\_1/numpy-1.14.3/numpy/distutils/misc\_util.py”, line 1024, in add\_subpackage  
caller\_level = 2)  
File “/Users/cyclo/Pylith222\_1/numpy-1.14.3/numpy/distutils/misc\_util.py”, line 993, in get\_subpackage  
caller\_level = caller\_level + 1)  
File “/Users/cyclo/Pylith222\_1/numpy-1.14.3/numpy/distutils/misc\_util.py”, line 930, in \_get\_configuration\_from\_setup\_py  
config = setup\_module.configuration(\*args)  
File “numpy/core/setup.py”, line 400, in configuration  
check\_api\_version(C\_API\_VERSION, codegen\_dir)  
File “numpy/core/setup\_common.py”, line 83, in check\_api\_version  
curapi\_hash, api\_hash = get\_api\_versions(apiversion, codegen\_dir)  
File “numpy/core/setup\_common.py”, line 74, in get\_api\_versions  
curapi\_hash = m.fullapi\_hash(numpy\_api.full\_api)  
File “numpy/core/code\_generators/genapi.py”, line 482, in fullapi\_hash  
return hashlib.md5(’’.join(a).encode(‘ascii’)).hexdigest()  
AttributeError: ‘module’ object has no attribute ‘md5’  
make[3]: \*\*\* [numpy] Error 1  
make[2]: \*\*\* [installed\_numpy] Error 2  
make[1]: \*\*\* [installed\_h5py] Error 2  
make: \*\*\* [installed\_pylith] Error 2

Can you help me with that?

---

<div class="post-metadata">

**Author:** ![baagaard](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/baagaard/32/615_2.png) [@baagaard](https://community.geodynamics.org/u/baagaard)\
**Post date:** [November 14, 2021, 8:51pm UTC](https://community.geodynamics.org/t/errors-when-building-pylith-on-cluster/1720/23 "2021-11-14T20:51:12Z")

</div>

My guess is that you are trying to use the system OpenSSL library, which is incompatible or not found. You can use --enable-openssl when configuring the installer to have it build the OpenSSL library.

Note: Is there a reason you are not using the maxOS binary? In general, we strongly recommend using the binary on desktops and laptops. If you are wanting to do development, then we recommend using the development Docker container and the current main (development) branch; instructions for that are posted at [PyLith development environment — PyLith Installer v3.0.0-0dev documentation](https://pylith-installer.readthedocs.io/en/latest/devenv/index.html).

---

<div class="post-metadata">

**Author:** ![marcontk](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/marcontk/32/922_2.png) [@marcontk](https://community.geodynamics.org/u/marcontk)\
**Post date:** [November 14, 2021, 9:57pm UTC](https://community.geodynamics.org/t/errors-when-building-pylith-on-cluster/1720/24 "2021-11-14T21:57:37Z")

</div>

Ok, thank you. Compiling with --enable-openssl works and does not give error. The problem appears later with numpy… pytia.

We are interested in compiling and testing a friction law that is not part of the binary distribution.

Ok, thanks! I will follow the instructions “posted at PyLith development environment”.

---

<div class="post-metadata">

**Author:** ![baagaard](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/baagaard/32/615_2.png) [@baagaard](https://community.geodynamics.org/u/baagaard)\
**Post date:** [November 15, 2021, 3:28am UTC](https://community.geodynamics.org/t/errors-when-building-pylith-on-cluster/1720/26 "2021-11-15T03:28:58Z")

</div>

If you want to add an alternative friction model, then you are currently stuck with v2.2.2 as we have not yet re-implemented friction in the PyLith main branch that has multiphysics capabilities.

I know the error you are getting is with numpy, but the module it is having trouble with is associated with OpenSSL. In particular, it happens when the hashlib module, which is a standard Python distribution, cannot be built when installing Python, because it can’t find OpenSSL or has trouble using it. In order to provide additional assistance, please provide the `config.log` from running the PyLith installer configure _and_ the config.log from the installation of Python.

---

<div class="post-metadata">

**Author:** ![marcontk](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/marcontk/32/922_2.png) [@marcontk](https://community.geodynamics.org/u/marcontk)\
**Post date:** [November 23, 2021, 11:17pm UTC](https://community.geodynamics.org/t/errors-when-building-pylith-on-cluster/1720/27 "2021-11-23T23:17:31Z")

</div>

This site does not let me attach config.log (it says I am a new user, I do not understand).  
I have continued with my compilation, I have advanced but I still have errors. After compiling netcdf it passes numpy, then to Cython and here I have the error with h5py:

writing build/bdist.macosx-10.13-intel/egg/EGG-INFO/native\_libs.txt  
creating dist  
creating ‘dist/Cython-0.29.16-py2.7-macosx-10.13-intel.egg’ and adding ‘build/bdist.macosx-10.13-intel/egg’ to it  
removing ‘build/bdist.macosx-10.13-intel/egg’ (and everything under it)  
Processing Cython-0.29.16-py2.7-macosx-10.13-intel.egg  
creating /Users/cyclo/pylith\_222\_1/lib/python2.7/site-packages/Cython-0.29.16-py2.7-macosx-10.13-intel.egg  
Extracting Cython-0.29.16-py2.7-macosx-10.13-intel.egg to /Users/cyclo/pylith\_222\_1/lib/python2.7/site-packages  
Adding Cython 0.29.16 to easy-install.pth file  
Installing cython script to /Users/cyclo/pylith\_222\_1/bin  
Installing cygdb script to /Users/cyclo/pylith\_222\_1/bin  
Installing cythonize script to /Users/cyclo/pylith\_222\_1/bin

Installed /Users/cyclo/pylith\_222\_1/lib/python2.7/site-packages/Cython-0.29.16-py2.7-macosx-10.13-intel.egg  
Processing dependencies for Cython==0.29.16  
Finished processing dependencies for Cython==0.29.16  
/Users/cyclo/Pylith222\_1/src/pylith/pylith-installer-2.2.2-1/bin/fetch.sh “/opt/local/bin/curl -L -O -o” h5py-2.9.0.tar.gz [Index of /~buildbot/deps](http://geoweb.cse.ucdavis.edu/~buildbot/deps)  
Found local copy of h5py-2.9.0.tar.gz.  
/usr/bin/tar -zxf h5py-2.9.0.tar.gz  
cd h5py-2.9.0 &&   
python setup.py configure --hdf5=/Users/cyclo/pylith\_222\_1 &&   
CC=mpicc CPPFLAGS="-I/Users/cyclo/pylith\_222\_1/include -I/Users/cyclo/pylith\_222\_1/include " LDFLAGS="-L/Users/cyclo/pylith\_222\_1/lib -L/Users/cyclo/pylith\_222\_1/lib64 -L/Users/cyclo/pylith\_222\_1/lib -L/Users/cyclo/pylith\_222\_1/lib64 " CFLAGS="-g -O2" CXXFLAGS="-g -O2 -DMPICH\_IGNORE\_CXX\_SEEK" FCFLAGS="-g -O2" python setup.py build &&   
python setup.py install --prefix=/Users/cyclo/pylith\_222\_1 &&   
touch /Users/cyclo/Pylith222\_1/installed\_h5py  
Couldn’t find index page for ‘pkgconfig’ (maybe misspelled?)  
No local packages or download links found for pkgconfig  
Traceback (most recent call last):  
File “setup.py”, line 168, in   
cmdclass = CMDCLASS,  
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py”, line 111, in setup  
\_setup\_distribution = dist = klass(attrs)  
File “/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/dist.py”, line 268, in **init**  
self.fetch\_build\_eggs(attrs[‘setup\_requires’])  
File “/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/dist.py”, line 313, in fetch\_build\_eggs  
replace\_conflicting=True,  
File “/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg\_resources/ **init**.py”, line 843, in resolve  
dist = best[req.key] = env.best\_match(req, ws, installer)  
File “/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg\_resources/ **init**.py”, line 1088, in best\_match  
return self.obtain(req, installer)  
File “/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg\_resources/ **init**.py”, line 1100, in obtain  
return installer(requirement)  
File “/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/dist.py”, line 380, in fetch\_build\_egg  
return cmd.easy\_install(req)  
File “/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy\_install.py”, line 632, in easy\_install  
raise DistutilsError(msg)  
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse(‘pkgconfig’)  
make[2]: \*\*\* [h5py] Error 1  
make[1]: \*\*\* [installed\_h5py] Error 2  
make: \*\*\* [installed\_pylith] Error 2

What am I missing?

---

<div class="post-metadata">

**Author:** ![baagaard](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/baagaard/32/615_2.png) [@baagaard](https://community.geodynamics.org/u/baagaard)\
**Post date:** [November 24, 2021, 2:38am UTC](https://community.geodynamics.org/t/errors-when-building-pylith-on-cluster/1720/28 "2021-11-24T02:38:17Z")

</div>

You may need to rename the file in order to attach it, for example to something like config\_log.txt. If you can’t attach the file, then post your configure arguments to the PyLith installer.

Note: I only have access to a mac with Big Sur. I tried to replicate your error but I end up with some different problems associated with incompatibilities with Big Sur and older versions of packages like OpenSSL and HDF5.

---

<div class="post-metadata">

**Author:** ![marcontk](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/marcontk/32/922_2.png) [@marcontk](https://community.geodynamics.org/u/marcontk)\
**Post date:** [November 24, 2021, 8:57pm UTC](https://community.geodynamics.org/t/errors-when-building-pylith-on-cluster/1720/29 "2021-11-24T20:57:26Z")

</div>

When I leave --disable-h5py , the compilation proceeds but with a new error. I could not attached config.log. Please can you check the shared link?

> **[pylith](https://www.dropbox.com/sh/h95p24zg8xb26zt/AADLWSQOQM2AEEm0Ohk5RHFQa?dl=0)**
>
> Shared with Dropbox

---

<div class="post-metadata">

**Author:** ![baagaard](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/baagaard/32/615_2.png) [@baagaard](https://community.geodynamics.org/u/baagaard)\
**Post date:** [November 30, 2021, 9:20pm UTC](https://community.geodynamics.org/t/errors-when-building-pylith-on-cluster/1720/30 "2021-11-30T21:20:40Z")

</div>

I am working on updating the PyLith installer to resolve several issues building v2.2.2. I am currently testing the updated version and updating the documentation. I hope to have a version you can try in the next day or so.

---

<div class="post-metadata">

**Author:** ![marcontk](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/marcontk/32/922_2.png) [@marcontk](https://community.geodynamics.org/u/marcontk)\
**Post date:** [December 3, 2021, 3:25pm UTC](https://community.geodynamics.org/t/errors-when-building-pylith-on-cluster/1720/31 "2021-12-03T15:25:23Z")

</div>

Excellent, thank you very much, I look forward to the new publication.

---

<div class="post-metadata">

**Author:** ![baagaard](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/baagaard/32/615_2.png) [@baagaard](https://community.geodynamics.org/u/baagaard)\
**Post date:** [December 6, 2021, 9:37pm UTC](https://community.geodynamics.org/t/errors-when-building-pylith-on-cluster/1720/32 "2021-12-06T21:37:30Z")

</div>

I have released version 2.2.2-2 of the PyLith Installer. See [https://community.geodynamics.org/t/pylith-installer-v2-2-2-2-now-available](https://community.geodynamics.org/t/pylith-installer-v2-2-2-2-now-available).

---

<div class="post-metadata">

**Author:** ![marcontk](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/marcontk/32/922_2.png) [@marcontk](https://community.geodynamics.org/u/marcontk)\
**Post date:** [December 8, 2021, 9:45pm UTC](https://community.geodynamics.org/t/errors-when-building-pylith-on-cluster/1720/33 "2021-12-08T21:45:24Z")

</div>

Hello, have been trying to compile the latest version from Installer 2.2.2-2. but I still have errors. I used macOS High Sierra, Catalina and BigSur. I had better results on Catalina.  
I share the logs in the following link (test-suite.log resulted in Catalina 10.15 ). I hope you can help me.

> **[pylith](https://www.dropbox.com/sh/h95p24zg8xb26zt/AADLWSQOQM2AEEm0Ohk5RHFQa?dl=0)**
>
> Shared with Dropbox

---

<div class="post-metadata">

**Author:** ![baagaard](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/baagaard/32/615_2.png) [@baagaard](https://community.geodynamics.org/u/baagaard)\
**Post date:** [December 8, 2021, 10:47pm UTC](https://community.geodynamics.org/t/errors-when-building-pylith-on-cluster/1720/34 "2021-12-08T22:47:47Z")

</div>

Googling the error you get wit Big Sur (configure: error: Unexpected output of ‘arch’ on OSX), it looks like Python 2.7 is not setup to work with the M1 Processor.

The failure to build automake on High Sierra baffles me. The only suggestion I have is to remove all non-system directories, such as `/Users/marcont/miniconda3/*` and `/opt/local/*`, from your PATH.

The failure with running the `spatialdata/geocoords` test on Catalina may be related to incompatibilities with other software. I suggest removing all of the non-system directories from your PATH.

You may have better luck with using the Docker container for PyLith development. All of the dependencies are provided and the environment is all setup so you don’t have to worry about conflicts with other software. VS Code (and some other IDEs) allows seamless access to the container, so it “feels” like you are working with local files.

---

<div class="post-metadata">

**Author:** ![marcontk](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/marcontk/32/922_2.png) [@marcontk](https://community.geodynamics.org/u/marcontk)\
**Post date:** [December 9, 2021, 1:59pm UTC](https://community.geodynamics.org/t/errors-when-building-pylith-on-cluster/1720/35 "2021-12-09T13:59:49Z")

</div>

Hi, good news on build 2.2.2.-2 on Catalina 10.15, it shows no errors and passed all tests. As you indicated miniconda3 was interfering.  
I will check later how to use pylith in Docker for now I have no experience in using Docker. Thank you very much for the assistance.

[Previous page](https://community.geodynamics.org/t/errors-when-building-pylith-on-cluster/1720.md?page=1)
