deeptools / pyBigWig

A python extension for quick access to bigWig and bigBed files
MIT License
212 stars 48 forks source link

Issue installing on macOS: pyBigWig.c:6:10: fatal error: 'values.h' file not found #114

Closed kevlarr closed 3 years ago

kevlarr commented 3 years ago

I've gone through all other closed issues and none have resolved. I have pybigWig==0.3 in my requirements file and am installing via pip install . -e '.[dev]' in a virtual environment, and am seeing this when trying to build:

    pyBigWig.c:6:10: fatal error: 'values.h' file not found

I don't know how to troubleshoot building C dependencies, and even cloning the repo I can't find a reference to "values.h" anywhere, so I'm not sure what I might be missing.

Full output below:

Installing collected packages: pyBigWig, KGA-API
  Running setup.py install for pyBigWig ... error
    Complete output from command /Users/kevlarr/.pyenv/versions/3.6.9/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/68/wvkmf2z538bdd8y4gx749k0w0000gn/T/pip-install-fi_ku4o4/pyBigWig/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/68/wvkmf2z538bdd8y4gx749k0w0000gn/T/pip-record-oc4yd4id/install-record.txt --single-version-externally-managed --compile:
    /Users/kevlarr/.pyenv/versions/3.6.9/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'classifier'
      warnings.warn(msg)
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.14-x86_64-3.6
    creating build/lib.macosx-10.14-x86_64-3.6/pyBigWigTest
    copying pyBigWigTest/__init__.py -> build/lib.macosx-10.14-x86_64-3.6/pyBigWigTest
    copying pyBigWigTest/test.py -> build/lib.macosx-10.14-x86_64-3.6/pyBigWigTest
    running egg_info
    writing pyBigWig.egg-info/PKG-INFO
    writing dependency_links to pyBigWig.egg-info/dependency_links.txt
    writing requirements to pyBigWig.egg-info/requires.txt
    writing top-level names to pyBigWig.egg-info/top_level.txt
    reading manifest file 'pyBigWig.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'pyBigWig.egg-info/SOURCES.txt'
    copying pyBigWigTest/test.bw -> build/lib.macosx-10.14-x86_64-3.6/pyBigWigTest
    running build_ext
    building 'pyBigWig' extension
    Warning: Can't read registry to find the necessary compiler setting
    Make sure that Python modules winreg, win32api or win32con are installed.
    C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/zlib/include

    creating build/temp.macosx-10.14-x86_64-3.6
    creating build/temp.macosx-10.14-x86_64-3.6/libBigWig
    compile options: '-DWITHNUMPY -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -IlibBigWig -I/Users/kevlarr/.pyenv/versions/3.6.9/include/python3.6m -I/Users/kevlarr/.pyenv/versions/3.6.9/lib/python3.6/site-packages/numpy/core/include -I/Users/kevlarr/.pyenv/versions/3.6.9/include/python3.6m -c'
    clang: libBigWig/bwRead.c
    clang: libBigWig/bwValues.c
    clang: pyBigWig.c
    clang: libBigWig/bwWrite.c
    clang: libBigWig/bwStats.c
    clang: libBigWig/io.c
    pyBigWig.c:6:10: fatal error: 'values.h' file not found
    #include <values.h>
             ^~~~~~~~~~
    1 error generated.
    error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/zlib/include -DWITHNUMPY -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -IlibBigWig -I/Users/kevlarr/.pyenv/versions/3.6.9/include/python3.6m -I/Users/kevlarr/.pyenv/versions/3.6.9/lib/python3.6/site-packages/numpy/core/include -I/Users/kevlarr/.pyenv/versions/3.6.9/include/python3.6m -c pyBigWig.c -o build/temp.macosx-10.14-x86_64-3.6/pyBigWig.o" failed with exit status 1
dpryan79 commented 3 years ago

This was fixed in version 0.3.1. I strongly encourage you to use a more recent version than 0.3.0.

kevlarr commented 3 years ago

@dpryan79 Whoops, my mistake - sorry about that. I totally missed that I'd written ==0.3 instead of ~=0.3