grizli icon indicating copy to clipboard operation
grizli copied to clipboard

Problems with installation

Open paolasantini opened this issue 3 years ago • 2 comments

I've followed the instructions here (https://grizli.readthedocs.io/en/latest/grizli/install.html#installation-with-conda-and-environment-yml , Preferred installation with conda/pip) but I get the errors attached below when running pip install --editable . -r requirements.txt

(I have installed git and clang under conda)

How can I solve that? Thank you

 clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/Paola/opt/anaconda3/envs/grizli39/include -arch x86_64 -I/Users/Paola/opt/anaconda3/envs/grizli39/include -fPIC -O2 -isystem /Users/Paola/opt/anaconda3/envs/grizli39/include -arch x86_64 -I/Users/Paola/opt/anaconda3/envs/grizli39/include/python3.9 -c pyregion/_compiler.c -o build/temp.macosx-10.9-x86_64-cpython-39/pyregion/_compiler.o
  In file included from pyregion/_compiler.c:1:
  /Users/Paola/opt/anaconda3/envs/grizli39/include/python3.9/Python.h:25:10: fatal error: 'stdio.h' file not found
  #include <stdio.h>
           ^~~~~~~~~
  1 error generated.
  error: command '/Users/Paola/opt/anaconda3/envs/grizli39/bin/clang' failed with exit code 1
  [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyregion
Running setup.py clean for pyregion
Building wheel for stsci.image (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for stsci.image (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [29 lines of output]
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-cpython-39
    creating build/lib.macosx-10.9-x86_64-cpython-39/stsci
    copying stsci/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-39/stsci
    creating build/lib.macosx-10.9-x86_64-cpython-39/stsci/image
    copying stsci/image/combine.py -> build/lib.macosx-10.9-x86_64-cpython-39/stsci/image
    copying stsci/image/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-39/stsci/image
    copying stsci/image/_image.py -> build/lib.macosx-10.9-x86_64-cpython-39/stsci/image
    copying stsci/image/numcombine.py -> build/lib.macosx-10.9-x86_64-cpython-39/stsci/image
    creating build/lib.macosx-10.9-x86_64-cpython-39/stsci/image/test
    copying stsci/image/test/test_median.py -> build/lib.macosx-10.9-x86_64-cpython-39/stsci/image/test
    copying stsci/image/test/test_threshold.py -> build/lib.macosx-10.9-x86_64-cpython-39/stsci/image/test
    copying stsci/image/test/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-39/stsci/image/test
    copying stsci/image/test/test_minimum.py -> build/lib.macosx-10.9-x86_64-cpython-39/stsci/image/test
    copying stsci/image/test/test_average.py -> build/lib.macosx-10.9-x86_64-cpython-39/stsci/image/test
    running build_ext
    building 'stsci.image._combine' extension
    creating build/temp.macosx-10.9-x86_64-cpython-39
    creating build/temp.macosx-10.9-x86_64-cpython-39/src
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/Paola/opt/anaconda3/envs/grizli39/include -arch x86_64 -I/Users/Paola/opt/anaconda3/envs/grizli39/include -fPIC -O2 -isystem /Users/Paola/opt/anaconda3/envs/grizli39/include -arch x86_64 -DNUMPY=1 -I/private/var/folders/nz/n2y34wdn605flmmqv5jldb780000gn/T/pip-build-env-xg86b5ra/overlay/lib/python3.9/site-packages/numpy/core/include -I/Users/Paola/opt/anaconda3/envs/grizli39/include/python3.9 -c src/_combinemodule.c -o build/temp.macosx-10.9-x86_64-cpython-39/src/_combinemodule.o
    In file included from src/_combinemodule.c:1:
    /Users/Paola/opt/anaconda3/envs/grizli39/include/python3.9/Python.h:25:10: fatal error: 'stdio.h' file not found
    #include <stdio.h>
             ^~~~~~~~~
    1 error generated.
    error: command '/Users/Paola/opt/anaconda3/envs/grizli39/bin/clang' failed with exit code 1
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for stsci.image
Building wheel for descartes (setup.py) ... done
Created wheel for descartes: filename=descartes-1.0.2-py3-none-any.whl size=4102 sha256=ba2e52755e3899ee8882a544da9c63a64b73078171cf2c5f519d29aeab32b479
Stored in directory: /private/var/folders/nz/n2y34wdn605flmmqv5jldb780000gn/T/pip-ephem-wheel-cache-sfs9doef/wheels/39/53/fc/d7f7111639900c7114c81a16186bb3eb3459be1ec0616610a1
Building wheel for reprocess-wfc3 (setup.py) ... done
Created wheel for reprocess-wfc3: filename=reprocess_wfc3-0.2.1-py3-none-any.whl size=16992 sha256=00b04c68073bb28a7b73c1bb37559111668fd123915e5bd02ceac1914dcc9938
Stored in directory: /private/var/folders/nz/n2y34wdn605flmmqv5jldb780000gn/T/pip-ephem-wheel-cache-sfs9doef/wheels/fe/73/c8/fada6b40a192abbd5a7037e764e37679d521c0c0a183c35061
Building wheel for eazy (setup.py) ... done
Created wheel for eazy: filename=eazy-0.5.2.dev68-py3-none-any.whl size=51868385 sha256=f0bd839ee9b47e7366f738c1296e38046443e12f42dedb2b7d4246839e856685
Stored in directory: /private/var/folders/nz/n2y34wdn605flmmqv5jldb780000gn/T/pip-ephem-wheel-cache-sfs9doef/wheels/5c/d3/d4/8f436ea64e9ad5042a74f5ea00e1647bb4aaaf8d9e04a0800d
Building wheel for tristars (setup.py) ... done
Created wheel for tristars: filename=tristars-0.1-py3-none-any.whl size=8938 sha256=f81e245485f480b8d1b1482bcade7a58e53277109b48bd1edeece42de4385e19
Stored in directory: /private/var/folders/nz/n2y34wdn605flmmqv5jldb780000gn/T/pip-ephem-wheel-cache-sfs9doef/wheels/27/b9/7f/21678ac87c60a98342ce0b07ef122f5517a3a102b309bb205c
Building wheel for stregion (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for stregion (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [31 lines of output]
    /private/var/folders/nz/n2y34wdn605flmmqv5jldb780000gn/T/pip-build-env-lzutuvyp/overlay/lib/python3.9/site-packages/setuptools/dist.py:317: DistDeprecationWarning: use_2to3 is ignored.
      warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-cpython-39
    creating build/lib.macosx-10.9-x86_64-cpython-39/stregion
    copying stregion/version.py -> build/lib.macosx-10.9-x86_64-cpython-39/stregion
    copying stregion/region_numbers.py -> build/lib.macosx-10.9-x86_64-cpython-39/stregion
    copying stregion/region_to_filter.py -> build/lib.macosx-10.9-x86_64-cpython-39/stregion
    copying stregion/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-39/stregion
    copying stregion/ds9_region_parser.py -> build/lib.macosx-10.9-x86_64-cpython-39/stregion
    copying stregion/parser_helper.py -> build/lib.macosx-10.9-x86_64-cpython-39/stregion
    copying stregion/kapteyn_celestial.py -> build/lib.macosx-10.9-x86_64-cpython-39/stregion
    copying stregion/wcs_helper.py -> build/lib.macosx-10.9-x86_64-cpython-39/stregion
    copying stregion/mpl_helper.py -> build/lib.macosx-10.9-x86_64-cpython-39/stregion
    copying stregion/ds9_attr_parser.py -> build/lib.macosx-10.9-x86_64-cpython-39/stregion
    copying stregion/physical_coordinate.py -> build/lib.macosx-10.9-x86_64-cpython-39/stregion
    copying stregion/wcs_converter.py -> build/lib.macosx-10.9-x86_64-cpython-39/stregion
    running build_ext
    building 'stregion._region_filter' extension
    creating build/temp.macosx-10.9-x86_64-cpython-39
    creating build/temp.macosx-10.9-x86_64-cpython-39/src
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/Paola/opt/anaconda3/envs/grizli39/include -arch x86_64 -I/Users/Paola/opt/anaconda3/envs/grizli39/include -fPIC -O2 -isystem /Users/Paola/opt/anaconda3/envs/grizli39/include -arch x86_64 -I./src -I/private/var/folders/nz/n2y34wdn605flmmqv5jldb780000gn/T/pip-build-env-lzutuvyp/overlay/lib/python3.9/site-packages/numpy/core/include -I/Users/Paola/opt/anaconda3/envs/grizli39/include/python3.9 -c src/_region_filter.c -o build/temp.macosx-10.9-x86_64-cpython-39/src/_region_filter.o
    In file included from src/_region_filter.c:4:
    /Users/Paola/opt/anaconda3/envs/grizli39/include/python3.9/Python.h:25:10: fatal error: 'stdio.h' file not found
    #include <stdio.h>
             ^~~~~~~~~
    1 error generated.
    error: command '/Users/Paola/opt/anaconda3/envs/grizli39/bin/clang' failed with exit code 1
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for stregion
Building wheel for stsci.imagestats (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for stsci.imagestats (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
    /private/var/folders/nz/n2y34wdn605flmmqv5jldb780000gn/T/pip-build-env-48vbkqpj/overlay/lib/python3.9/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'upload-dir' will not be supported in future versions. Please use the underscore name 'upload_dir' instead
      warnings.warn(
    /private/var/folders/nz/n2y34wdn605flmmqv5jldb780000gn/T/pip-build-env-48vbkqpj/overlay/lib/python3.9/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'show-response' will not be supported in future versions. Please use the underscore name 'show_response' instead
      warnings.warn(
    /private/var/folders/nz/n2y34wdn605flmmqv5jldb780000gn/T/pip-build-env-48vbkqpj/overlay/lib/python3.9/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420).
      warnings.warn(msg, warning_class)
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-cpython-39
    creating build/lib.macosx-10.9-x86_64-cpython-39/stsci
    copying stsci/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-39/stsci
    creating build/lib.macosx-10.9-x86_64-cpython-39/stsci/imagestats
    copying stsci/imagestats/histogram1d.py -> build/lib.macosx-10.9-x86_64-cpython-39/stsci/imagestats
    copying stsci/imagestats/_version.py -> build/lib.macosx-10.9-x86_64-cpython-39/stsci/imagestats
    copying stsci/imagestats/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-39/stsci/imagestats
    running build_ext
    building 'stsci.imagestats.buildHistogram' extension
    creating build/temp.macosx-10.9-x86_64-cpython-39
    creating build/temp.macosx-10.9-x86_64-cpython-39/src
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/Paola/opt/anaconda3/envs/grizli39/include -arch x86_64 -I/Users/Paola/opt/anaconda3/envs/grizli39/include -fPIC -O2 -isystem /Users/Paola/opt/anaconda3/envs/grizli39/include -arch x86_64 -DNUMPY=1 -I/private/var/folders/nz/n2y34wdn605flmmqv5jldb780000gn/T/pip-build-env-48vbkqpj/overlay/lib/python3.9/site-packages/numpy/core/include -I/Users/Paola/opt/anaconda3/envs/grizli39/include/python3.9 -c src/buildHistogram.c -o build/temp.macosx-10.9-x86_64-cpython-39/src/buildHistogram.o
    src/buildHistogram.c:6:10: fatal error: 'string.h' file not found
    #include <string.h>
             ^~~~~~~~~~
    1 error generated.
    error: command '/Users/Paola/opt/anaconda3/envs/grizli39/bin/clang' failed with exit code 1
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for stsci.imagestats
Successfully built descartes reprocess-wfc3 eazy tristars
Failed to build pyregion stsci.image stregion stsci.imagestats
ERROR: Could not build wheels for stsci.image, stregion, stsci.imagestats, which is required to install pyproject.toml-based projects

paolasantini avatar Nov 09 '22 21:11 paolasantini

It seems like the compiler is not able to find the basic C libraries, like stdio.h and string.h. I haven't seen that before. If this is a mac, do you have the developer tools installed, like, gcc, etc.?

gbrammer avatar Nov 10 '22 15:11 gbrammer

Thanks a lot, I installed the developer tools and it works now.

paolasantini avatar Nov 12 '22 01:11 paolasantini