0

I am running the Catalina Mac OS X beta (19A558d). I have installed a python virtual environment for python 3.7 and am trying to install the package "pymatgen". The installation is having trouble with a dependent library called spglib which in turn (see below) has trouble with variable types being undefined presumably due to a missing/malformed header. Does anyone have any idea how to proceed? Thanks for any help in advance!

Python 3.7.4
(pymatgen) Axionic:~ 

$ pip install --upgrade pymatgen
Collecting pymatgen
Using cached https://files.pythonhosted.org/packages/4c/bb/aefd616a5863918cef41369a9130182c1a0439232cb898d96511a51afdab/pymatgen-2019.9.16-cp37-cp37m-macosx_10_9_x86_64.whl
Requirement already satisfied, skipping upgrade: ruamel.yaml>=0.15.6 in ./pymatgen/lib/python3.7/site-packages (from pymatgen) (0.16.5)
Requirement already satisfied, skipping upgrade: pydispatcher>=2.0.5 in ./pymatgen/lib/python3.7/site-packages (from pymatgen) (2.0.5)
Requirement already satisfied, skipping upgrade: pandas in ./pymatgen/lib/python3.7/site-packages (from pymatgen) (0.25.0)
Requirement already satisfied, skipping upgrade: requests in ./pymatgen/lib/python3.7/site-packages (from pymatgen) (2.22.0)
Requirement already satisfied, skipping upgrade: palettable>=3.1.1 in ./pymatgen/lib/python3.7/site-packages (from pymatgen) (3.2.0)
Collecting spglib>=1.9.9.44 (from pymatgen)
Using cached https://files.pythonhosted.org/packages/8a/c3/b3d1ae9be4dc334513cc21026103bc0f791ee439d8396c154a5f5ccfc8e8/spglib-1.14.1.post0.tar.gz
Requirement already satisfied, skipping upgrade: networkx>=2.2 in ./pymatgen/lib/python3.7/site-packages (from pymatgen) (2.3)
Requirement already satisfied, skipping upgrade: matplotlib>=1.5 in ./pymatgen/lib/python3.7/site-packages (from pymatgen) (3.1.1)
Requirement already satisfied, skipping upgrade: tabulate in ./pymatgen/lib/python3.7/site-packages (from pymatgen) (0.8.3)
Requirement already satisfied, skipping upgrade: sympy in ./pymatgen/lib/python3.7/site-packages (from pymatgen) (1.4)
Requirement already satisfied, skipping upgrade: scipy>=1.0.1 in ./pymatgen/lib/python3.7/site-packages (from pymatgen) (1.3.1)
Requirement already satisfied, skipping upgrade: monty>=2.0.6 in ./pymatgen/lib/python3.7/site-packages (from pymatgen) (2.0.6)
Requirement already satisfied, skipping upgrade: numpy>=1.14.3 in ./pymatgen/lib/python3.7/site-packages (from pymatgen) (1.17.2)
Requirement already satisfied, skipping upgrade: ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.8" in ./pymatgen/lib/python3.7/site-packages (from ruamel.yaml>=0.15.6->pymatgen) (0.1.2)
Requirement already satisfied, skipping upgrade: python-dateutil>=2.6.1 in ./pymatgen/lib/python3.7/site-packages (from pandas->pymatgen) (2.8.0)
Requirement already satisfied, skipping upgrade: pytz>=2017.2 in ./pymatgen/lib/python3.7/site-packages (from pandas->pymatgen) (2019.2)
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in ./pymatgen/lib/python3.7/site-packages (from requests->pymatgen) (3.0.4)
Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in ./pymatgen/lib/python3.7/site-packages (from requests->pymatgen) (1.25.3)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in ./pymatgen/lib/python3.7/site-packages (from requests->pymatgen) (2019.6.16)
Requirement already satisfied, skipping upgrade: idna<2.9,>=2.5 in ./pymatgen/lib/python3.7/site-packages (from requests->pymatgen) (2.8)
Requirement already satisfied, skipping upgrade: decorator>=4.3.0 in ./pymatgen/lib/python3.7/site-packages (from networkx>=2.2->pymatgen) (4.4.0)
Requirement already satisfied, skipping upgrade: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in ./pymatgen/lib/python3.7/site-packages (from matplotlib>=1.5->pymatgen) (2.4.2)
Requirement already satisfied, skipping upgrade: kiwisolver>=1.0.1 in ./pymatgen/lib/python3.7/site-packages (from matplotlib>=1.5->pymatgen) (1.1.0)
Requirement already satisfied, skipping upgrade: cycler>=0.10 in ./pymatgen/lib/python3.7/site-packages (from matplotlib>=1.5->pymatgen) (0.10.0)
Requirement already satisfied, skipping upgrade: mpmath>=0.19 in ./pymatgen/lib/python3.7/site-packages (from sympy->pymatgen) (1.1.0)
Requirement already satisfied, skipping upgrade: six in ./pymatgen/lib/python3.7/site-packages (from monty>=2.0.6->pymatgen) (1.12.0)
Requirement already satisfied, skipping upgrade: setuptools in ./pymatgen/lib/python3.7/site-packages (from kiwisolver>=1.0.1->matplotlib>=1.5->pymatgen) (40.8.0)
Installing collected packages: spglib, pymatgen
**Running setup.py install for spglib ... error
ERROR: Command errored out with exit status 1:
 command: /Users/paulfons/pymatgen/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/jh/m9brnf7s4zj__9vn7d3kq0pw0000gn/T/pip-install-y3gf08o4/spglib/setup.py'"'"'; __file__='"'"'/private/var/folders/jh/m9brnf7s4zj__9vn7d3kq0pw0000gn/T/pip-install-y3gf08o4/spglib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/jh/m9brnf7s4zj__9vn7d3kq0pw0000gn/T/pip-record-4wwvh7p8/install-record.txt --single-version-externally-managed --compile --install-headers /Users/paulfons/pymatgen/include/site/python3.7/spglib
     cwd: /private/var/folders/jh/m9brnf7s4zj__9vn7d3kq0pw0000gn/T/pip-install-y3gf08o4/spglib/
Complete output (83 lines):
setuptools is used.
/Users/paulfons/pymatgen/lib/python3.7/site-packages/setuptools/dist.py:475: UserWarning: Normalizing '1.14.1-0' to '1.14.1.post0'
  normalized_version,
running install
running build
running build_py
creating build
creating build/lib.macosx-10.14-x86_64-3.7
creating build/lib.macosx-10.14-x86_64-3.7/spglib
copying spglib/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/spglib
copying spglib/spglib.py -> build/lib.macosx-10.14-x86_64-3.7/spglib
running build_ext
building 'spglib._spglib' extension
creating build/temp.macosx-10.14-x86_64-3.7
creating build/temp.macosx-10.14-x86_64-3.7/src
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -Isrc -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/Users/paulfons/pymatgen/include -I/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/paulfons/pymatgen/lib/python3.7/site-packages/numpy/core/include -c _spglib.c -o build/temp.macosx-10.14-x86_64-3.7/_spglib.o
In file included from _spglib.c:35:
In file included from /usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/include/python3.7m/Python.h:11:
In file included from /usr/local/include/limits.h:37:
In file included from /usr/local/include/utils.h:35:
In file included from /usr/local/include/yara/strutils.h:34:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdlib.h:66:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/wait.h:110:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:196:2: error: unknown type name 'uint8_t'
        uint8_t  ri_uuid[16];
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:197:2: error: unknown type name 'uint64_t'
        uint64_t ri_user_time;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:198:2: error: unknown type name 'uint64_t'
        uint64_t ri_system_time;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:199:2: error: unknown type name 'uint64_t'
        uint64_t ri_pkg_idle_wkups;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:200:2: error: unknown type name 'uint64_t'
        uint64_t ri_interrupt_wkups;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:201:2: error: unknown type name 'uint64_t'
        uint64_t ri_pageins;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:202:2: error: unknown type name 'uint64_t'
        uint64_t ri_wired_size;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:203:2: error: unknown type name 'uint64_t'
        uint64_t ri_resident_size;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:204:2: error: unknown type name 'uint64_t'
        uint64_t ri_phys_footprint;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:205:2: error: unknown type name 'uint64_t'
        uint64_t ri_proc_start_abstime;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:206:2: error: unknown type name 'uint64_t'
        uint64_t ri_proc_exit_abstime;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:210:2: error: unknown type name 'uint8_t'
        uint8_t  ri_uuid[16];
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:211:2: error: unknown type name 'uint64_t'
        uint64_t ri_user_time;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:212:2: error: unknown type name 'uint64_t'
        uint64_t ri_system_time;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:213:2: error: unknown type name 'uint64_t'
        uint64_t ri_pkg_idle_wkups;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:214:2: error: unknown type name 'uint64_t'
        uint64_t ri_interrupt_wkups;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:215:2: error: unknown type name 'uint64_t'
        uint64_t ri_pageins;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:216:2: error: unknown type name 'uint64_t'
        uint64_t ri_wired_size;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:217:2: error: unknown type name 'uint64_t'
        uint64_t ri_resident_size;
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/paulfons/pymatgen/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/jh/m9brnf7s4zj__9vn7d3kq0pw0000gn/T/pip-install-y3gf08o4/spglib/setup.py'"'"'; __file__='"'"'/private/var/folders/jh/m9brnf7s4zj__9vn7d3kq0pw0000gn/T/pip-install-y3gf08o4/spglib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/jh/m9brnf7s4zj__9vn7d3kq0pw0000gn/T/pip-record-4wwvh7p8/install-record.txt --single-version-externally-managed --compile --install-headers /Users/paulfons/pymatgen/include/site/python3.7/spglib Check the logs for full command output.**
  • @ankii What here is 32 bit? – user151019 Sep 18 at 10:52
  • @Mark ah.. my bad. – ankii Sep 18 at 11:05
  • Where did /usr/local/include/limits.h come from? I would guess that you are picking up bad include files from /usr/local/include – user151019 Sep 18 at 11:07

You must log in to answer this question.

Browse other questions tagged .