deeptools / pyBigWig

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

Error Installing pyBigWig #120

Closed pzhang312 closed 2 years ago

pzhang312 commented 2 years ago

Hello, I encountered errors while installing deeptools with pip install and I suspected it was due to failure to install pyBigWig, so I tried to pip install pyBigWig separately and got this error:

$ pip install --user pyBigWig
Collecting pyBigWig
  Using cached https://files.pythonhosted.org/packages/23/29/b51c3580427dd66dfecd63ffbe2dfa37175d3c898b289a3f27def1be34c0/pyBigWig-0.3.18.tar.gz
Building wheels for collected packages: pyBigWig
  Building wheel for pyBigWig (setup.py) ... error
  ERROR: Complete output from command /usr/local/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-0czvyly3/pyBigWig/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 /tmp/pip-wheel-idzv08el --python-tag cp37:
  ERROR: /home/pzhang/.local/lib/python3.7/site-packages/setuptools/dist.py:720: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
    % (opt, underscore_opt)
  /usr/local/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'classifier'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.freebsd-12.2-RELEASE-amd64-3.7
  creating build/lib.freebsd-12.2-RELEASE-amd64-3.7/pyBigWigTest
  copying pyBigWigTest/__init__.py -> build/lib.freebsd-12.2-RELEASE-amd64-3.7/pyBigWigTest
  copying pyBigWigTest/test.py -> build/lib.freebsd-12.2-RELEASE-amd64-3.7/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'
  adding license file 'LICENSE.txt'
  writing manifest file 'pyBigWig.egg-info/SOURCES.txt'
  copying pyBigWigTest/test.bigBed -> build/lib.freebsd-12.2-RELEASE-amd64-3.7/pyBigWigTest
  copying pyBigWigTest/test.bw -> build/lib.freebsd-12.2-RELEASE-amd64-3.7/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: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC

  creating build/temp.freebsd-12.2-RELEASE-amd64-3.7
  creating build/temp.freebsd-12.2-RELEASE-amd64-3.7/libBigWig
  compile options: '-DWITHNUMPY -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -IlibBigWig -I/usr/local/include/python3.7m -I/usr/local/lib/python3.7/site-packages/numpy/core/include -I/usr/local/include/python3.7m -c'
  cc: libBigWig/bwStats.ccc: libBigWig/bwValues.c

  cc: libBigWig/io.c
  cc: pyBigWig.c
  In file included from libBigWig/bwStats.c:1:
  In file included from libBigWig/bigWig.h:4:
  libBigWig/bigWigIO.h:5:10: fatal error: 'curl/curl.h' file not found
  #include <curl/curl.h>
           ^~~~~~~~~~~~~
  cc: libBigWig/bwWrite.c
  In file included from libBigWig/bwValues.c:1:
  In file included from libBigWig/bigWig.h:4:
  libBigWig/bigWigIO.h:5:10: fatal error: 'curl/curl.h' file not found
  #include <curl/curl.h>
           ^~~~~~~~~~~~~
  cc: libBigWig/bwRead.c
  libBigWig/io.c:2:10: fatal error: 'curl/curl.h' file not found
  #include <curl/curl.h>
           ^~~~~~~~~~~~~
  In file included from libBigWig/bwRead.c:1:
  In file included from libBigWig/bigWig.h:4:
  libBigWig/bigWigIO.h:5:10: fatal error: 'curl/curl.h' file not found
  #include <curl/curl.h>
           ^~~~~~~~~~~~~
  1 error generated.
  1 error generated.
  1 error generated.
  In file included from libBigWig/bwWrite.c:6:
  In file included from libBigWig/bigWig.h:4:
  libBigWig/bigWigIO.h:5:10: fatal error: 'curl/curl.h' file not found
  #include <curl/curl.h>
           ^~~~~~~~~~~~~
  1 error generated.
  1 error generated.
  In file included from pyBigWig.c:3:
  In file included from ./pyBigWig.h:3:
  In file included from libBigWig/bigWig.h:4:
  libBigWig/bigWigIO.h:5:10: fatal error: 'curl/curl.h' file not found
  #include <curl/curl.h>
           ^~~~~~~~~~~~~
  1 error generated.
  error: Command "cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -DWITHNUMPY -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -IlibBigWig -I/usr/local/include/python3.7m -I/usr/local/lib/python3.7/site-packages/numpy/core/include -I/usr/local/include/python3.7m -c libBigWig/bwStats.c -o build/temp.freebsd-12.2-RELEASE-amd64-3.7/libBigWig/bwStats.o" failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pyBigWig
  Running setup.py clean for pyBigWig
Failed to build pyBigWig
Installing collected packages: pyBigWig
  Running setup.py install for pyBigWig ... error
    ERROR: Complete output from command /usr/local/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-0czvyly3/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 /tmp/pip-record-tnro_e_0/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    ERROR: /home/pzhang/.local/lib/python3.7/site-packages/setuptools/dist.py:720: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
      % (opt, underscore_opt)
    /usr/local/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'classifier'
      warnings.warn(msg)
    running install
    /home/pzhang/.local/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      setuptools.SetuptoolsDeprecationWarning,
    running build
    running build_py
    creating build
    creating build/lib.freebsd-12.2-RELEASE-amd64-3.7
    creating build/lib.freebsd-12.2-RELEASE-amd64-3.7/pyBigWigTest
    copying pyBigWigTest/__init__.py -> build/lib.freebsd-12.2-RELEASE-amd64-3.7/pyBigWigTest
    copying pyBigWigTest/test.py -> build/lib.freebsd-12.2-RELEASE-amd64-3.7/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'
    adding license file 'LICENSE.txt'
    writing manifest file 'pyBigWig.egg-info/SOURCES.txt'
    copying pyBigWigTest/test.bigBed -> build/lib.freebsd-12.2-RELEASE-amd64-3.7/pyBigWigTest
    copying pyBigWigTest/test.bw -> build/lib.freebsd-12.2-RELEASE-amd64-3.7/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: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC

    creating build/temp.freebsd-12.2-RELEASE-amd64-3.7
    creating build/temp.freebsd-12.2-RELEASE-amd64-3.7/libBigWig
    compile options: '-DWITHNUMPY -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -IlibBigWig -I/usr/local/include/python3.7m -I/usr/local/lib/python3.7/site-packages/numpy/core/include -I/usr/local/include/python3.7m -c'
    cc: libBigWig/bwWrite.ccc: libBigWig/io.c

    cc: pyBigWig.c
    cc: libBigWig/bwStats.ccc: libBigWig/bwValues.c

    cc: libBigWig/bwRead.c
    libBigWig/io.c:2:10: fatal error: 'curl/curl.h' file not found
    #include <curl/curl.h>
             ^~~~~~~~~~~~~
    In file included from libBigWig/bwStats.c:1:
    In file included from libBigWig/bigWig.h:4:
    libBigWig/bigWigIO.h:5:10: fatal error: 'curl/curl.h' file not found
    #include <curl/curl.h>
             ^~~~~~~~~~~~~
    In file included from libBigWig/bwRead.c:1:
    In file included from libBigWig/bigWig.h:4:
    libBigWig/bigWigIO.h:5:10: fatal error: 'curl/curl.h' file not found
    #include <curl/curl.h>
             ^~~~~~~~~~~~~
    1 error generated.
    In file included from libBigWig/bwValues.c:1:
    In file included from libBigWig/bigWig.h:4:
    libBigWig/bigWigIO.h:5:10: fatal error: 'curl/curl.h' file not found
    #include <curl/curl.h>
             ^~~~~~~~~~~~~
    In file included from libBigWig/bwWrite.c:6:
    In file included from libBigWig/bigWig.h:4:
    libBigWig/bigWigIO.h:5:10: fatal error: 'curl/curl.h' file not found
    #include <curl/curl.h>
             ^~~~~~~~~~~~~
    1 error generated.
    1 error generated.
    1 error generated.
    1 error generated.
    In file included from pyBigWig.c:3:
    In file included from ./pyBigWig.h:3:
    In file included from libBigWig/bigWig.h:4:
    libBigWig/bigWigIO.h:5:10: fatal error: 'curl/curl.h' file not found
    #include <curl/curl.h>
             ^~~~~~~~~~~~~
    1 error generated.
    error: Command "cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -DWITHNUMPY -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -IlibBigWig -I/usr/local/include/python3.7m -I/usr/local/lib/python3.7/site-packages/numpy/core/include -I/usr/local/include/python3.7m -c libBigWig/io.c -o build/temp.freebsd-12.2-RELEASE-amd64-3.7/libBigWig/io.o" failed with exit status 1
    ----------------------------------------
ERROR: Command "/usr/local/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-0czvyly3/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 /tmp/pip-record-tnro_e_0/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-0czvyly3/pyBigWig/

Any help would be appreciated!

dpryan79 commented 2 years ago

Please install libcurl (it may be called something like curl-devel in your package manager). Alternatively, pyBigWig can be installed with conda.

pzhang312 commented 2 years ago

Thanks for the reply. But I found my system has libcurl already (in /usr/local/lib/). It's version 4.6.0. Do I need a newer version?

dpryan79 commented 2 years ago

You, but you need the -dev version of the package so the headers are present.

1123mogong commented 2 years ago

Hello, I'm using conda, curl has been downloaded, but pybigwig cannot be downloaded

dpryan79 commented 2 years ago

conda install -c conda-forge -c bioconda pybigwig should work without issue.

YunfengLUMC commented 2 years ago

Hi, I tried the code you said ,"conda install -c conda-forge -c bioconda pybigwig" , but I got error just like this: pakgeNotfound error 1642518194(1)

I don't know how to fix this problem,any help would be appreciated!

1123mogong commented 2 years ago

Deeptools requires the Pysam component, but Windows does not support it. You need to use Linux or Mac. Can you speak chinese?My English is not very good

墨攻

@.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2022年01月18日 23:06 | | 收件人 | @.> | | 抄送至 | @.**@.> | | 主题 | Re: [deeptools/pyBigWig] Error Installing pyBigWig (Issue #120) |

Hi, I tried the code you said ,"conda install -c conda-forge -c bioconda pybigwig" , but I got error just like this: pakgeNotfound error

I don't know how to fix this problem,any help would be appreciated!

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>

YunfengLUMC commented 2 years ago

of course, I can speak chinese. 你的意思是说我需要在linux上运行conda的安装命令才能装这个pyBigWig包吗? 谢谢!

1123mogong commented 2 years ago

对,没错,我的deeptools已经安装,并正常运行了,你有微信或者qq吗,我可以指导你全程的安装,deeptools的依赖包有点多,我是一个一个把依赖包安装好,然后再去安装的deeptools

墨攻

@.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2022年01月18日 23:20 | | 收件人 | @.> | | 抄送至 | @.**@.> | | 主题 | Re: [deeptools/pyBigWig] Error Installing pyBigWig (Issue #120) |

of course, I can speak chinese. 你的意思是说我需要在linux上运行conda的安装命令才能装这个pyBigWig包吗? 谢谢!

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>

1123mogong commented 2 years ago

加了,墨玦

墨攻

@.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2022年01月18日 23:29 | | 收件人 | @.> | | 抄送至 | @.**@.> | | 主题 | Re: [deeptools/pyBigWig] Error Installing pyBigWig (Issue #120) |

好的好的,万分感谢!! wechat:sanjilyf

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>

dpryan79 commented 2 years ago

On windows install wsl or wsl2 and use conda from there. You'll then have access to the entire ecosystem of bioinformatics packages and not have the typical windows constraints.