hobuinc / mgrs

Python MGRS library
https://pypi.python.org/pypi/mgrs
MIT License
111 stars 36 forks source link

MacOS Compiling issue #20

Closed RC-5000 closed 4 years ago

RC-5000 commented 6 years ago

Trying to get mgrs up and running on my mac. Get the following message. (MacOS 10.13.6)


car-work:~ car$ pip install mgrs Collecting mgrs Using cached https://files.pythonhosted.org/packages/1d/49/7abb4403bd44971fa5b75e9deb904ada7c545660dc0704ea79c776d59c49/mgrs-1.3.5.zip Requirement already satisfied: setuptools in ./anaconda3/lib/python3.6/site-packages (from mgrs) (39.1.0) Requirement already satisfied: wheel in ./anaconda3/lib/python3.6/site-packages (from mgrs) (0.31.1) Building wheels for collected packages: mgrs Running setup.py bdist_wheel for mgrs ... error Complete output from command /Users/car/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/8t/5gv3jn288xl05q006s6ffnzh0000gn/T/pip-install-f3fhby_a/mgrs/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /private/var/folders/8t/5gv3jn288xl05q006s6ffnzh0000gn/T/pip-wheel-43jui_tm --python-tag cp36: running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.7-x86_64-3.6 creating build/lib.macosx-10.7-x86_64-3.6/mgrs copying mgrs/init.py -> build/lib.macosx-10.7-x86_64-3.6/mgrs copying mgrs/core.py -> build/lib.macosx-10.7-x86_64-3.6/mgrs running build_ext sh: line 1: 51479 Segmentation fault: 11 'gcc' --version 2> /dev/null > '/var/folders/8t/5gv3jn288xl05q006s6ffnzh0000gn/T/tmpbr13cdza' building 'libmgrs' extension creating build/temp.macosx-10.7-x86_64-3.6 creating build/temp.macosx-10.7-x86_64-3.6/libmgrs gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/car/anaconda3/include -arch x86_64 -I/Users/car/anaconda3/include -arch x86_64 -I./libmgrs -I/Users/car/anaconda3/include/python3.6m -c libmgrs/mgrs.c -o build/temp.macosx-10.7-x86_64-3.6/libmgrs/mgrs.o gcc: error: x86_64: No such file or directory gcc: error: x86_64: No such file or directory gcc: error: unrecognized option ‘-arch’ gcc: error: unrecognized option ‘-arch’ error: command 'gcc' failed with exit status 1


Failed building wheel for mgrs Running setup.py clean for mgrs Failed to build mgrs Installing collected packages: mgrs Running setup.py install for mgrs ... error Complete output from command /Users/car/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/8t/5gv3jn288xl05q006s6ffnzh0000gn/T/pip-install-f3fhby_a/mgrs/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/8t/5gv3jn288xl05q006s6ffnzh0000gn/T/pip-record-wabximyx/install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build/lib.macosx-10.7-x86_64-3.6 creating build/lib.macosx-10.7-x86_64-3.6/mgrs copying mgrs/init.py -> build/lib.macosx-10.7-x86_64-3.6/mgrs copying mgrs/core.py -> build/lib.macosx-10.7-x86_64-3.6/mgrs running build_ext sh: line 1: 51500 Segmentation fault: 11 'gcc' --version 2> /dev/null > '/var/folders/8t/5gv3jn288xl05q006s6ffnzh0000gn/T/tmp5afzv33o' building 'libmgrs' extension creating build/temp.macosx-10.7-x86_64-3.6 creating build/temp.macosx-10.7-x86_64-3.6/libmgrs gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/car/anaconda3/include -arch x86_64 -I/Users/car/anaconda3/include -arch x86_64 -I./libmgrs -I/Users/car/anaconda3/include/python3.6m -c libmgrs/mgrs.c -o build/temp.macosx-10.7-x86_64-3.6/libmgrs/mgrs.o gcc: error: x86_64: No such file or directory gcc: error: x86_64: No such file or directory gcc: error: unrecognized option ‘-arch’ gcc: error: unrecognized option ‘-arch’ error: command 'gcc' failed with exit status 1

----------------------------------------

Command "/Users/car/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/8t/5gv3jn288xl05q006s6ffnzh0000gn/T/pip-install-f3fhby_a/mgrs/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/8t/5gv3jn288xl05q006s6ffnzh0000gn/T/pip-record-wabximyx/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/8t/5gv3jn288xl05q006s6ffnzh0000gn/T/pip-install-f3fhby_a/mgrs/ car-work:~ car$

jasonrhaas commented 4 years ago

This package relies on C libraries to work, which often involves installing gcc on your system at a minimum.