安装pybm3d时报错

 pip3.5 install pybm3d
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Collecting pybm3d
  Using cached pybm3d-0.2.1.tar.gz (1.1 MB)
Requirement already satisfied: setuptools>=18.0 in ./EDA/lib/python3.5/site-packages (from pybm3d) (50.3.2)
Requirement already satisfied: cython>=0.27 in /home/yangli/.local/lib/python3.5/site-packages (from pybm3d) (0.29.32)
Requirement already satisfied: numpy>=1.13 in /home/yangli/.local/lib/python3.5/site-packages (from pybm3d) (1.16.3)
Building wheels for collected packages: pybm3d
  Building wheel for pybm3d (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/yangli/PycharmProjects/Ocr/EDA/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lm08uerr/pybm3d_557c119d48954f87be1e5ab440c625a3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lm08uerr/pybm3d_557c119d48954f87be1e5ab440c625a3/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-j1uve0rl
       cwd: /tmp/pip-install-lm08uerr/pybm3d_557c119d48954f87be1e5ab440c625a3/
  Complete output (26 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.5
  creating build/lib.linux-x86_64-3.5/pybm3d
  copying pybm3d/__init__.py -> build/lib.linux-x86_64-3.5/pybm3d
  running build_ext
  skipping 'pybm3d/bm3d.cpp' Cython extension (up-to-date)
  building 'pybm3d.bm3d' extension
  creating build/temp.linux-x86_64-3.5
  creating build/temp.linux-x86_64-3.5/pybm3d
  creating build/temp.linux-x86_64-3.5/bm3d_src
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/yangli/PycharmProjects/Ocr/EDA/include -I/usr/include/python3.5m -I/home/yangli/.local/lib/python3.5/site-packages/numpy/core/include -c pybm3d/bm3d.cpp -o build/temp.linux-x86_64-3.5/pybm3d/bm3d.o -march=native -Wall -Wextra
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  In file included from /home/yangli/.local/lib/python3.5/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:0,
                   from /home/yangli/.local/lib/python3.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                   from /home/yangli/.local/lib/python3.5/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                   from pybm3d/bm3d.cpp:536:
  /home/yangli/.local/lib/python3.5/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   #warning "Using deprecated NumPy API, disable it with " \
    ^
  In file included from pybm3d/bm3d.cpp:538:0:
  pybm3d/../bm3d_src/bm3d.h:4:19: fatal error: fftw3.h: No such file or directory
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pybm3d
  Running setup.py clean for pybm3d
Failed to build pybm3d
Installing collected packages: pybm3d
    Running setup.py install for pybm3d ... error
    ERROR: Command errored out with exit status 1:
     command: /home/yangli/PycharmProjects/Ocr/EDA/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lm08uerr/pybm3d_557c119d48954f87be1e5ab440c625a3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lm08uerr/pybm3d_557c119d48954f87be1e5ab440c625a3/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-1117p7c3/install-record.txt --single-version-externally-managed --compile --install-headers /home/yangli/PycharmProjects/Ocr/EDA/include/site/python3.5/pybm3d
         cwd: /tmp/pip-install-lm08uerr/pybm3d_557c119d48954f87be1e5ab440c625a3/
    Complete output (26 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.5
    creating build/lib.linux-x86_64-3.5/pybm3d
    copying pybm3d/__init__.py -> build/lib.linux-x86_64-3.5/pybm3d
    running build_ext
    skipping 'pybm3d/bm3d.cpp' Cython extension (up-to-date)
    building 'pybm3d.bm3d' extension
    creating build/temp.linux-x86_64-3.5
    creating build/temp.linux-x86_64-3.5/pybm3d
    creating build/temp.linux-x86_64-3.5/bm3d_src
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/yangli/PycharmProjects/Ocr/EDA/include -I/usr/include/python3.5m -I/home/yangli/.local/lib/python3.5/site-packages/numpy/core/include -c pybm3d/bm3d.cpp -o build/temp.linux-x86_64-3.5/pybm3d/bm3d.o -march=native -Wall -Wextra
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    In file included from /home/yangli/.local/lib/python3.5/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:0,
                     from /home/yangli/.local/lib/python3.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                     from /home/yangli/.local/lib/python3.5/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from pybm3d/bm3d.cpp:536:
    /home/yangli/.local/lib/python3.5/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     #warning "Using deprecated NumPy API, disable it with " \
      ^
    In file included from pybm3d/bm3d.cpp:538:0:
    pybm3d/../bm3d_src/bm3d.h:4:19: fatal error: fftw3.h: No such file or directory
    compilation terminated.

    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/yangli/PycharmProjects/Ocr/EDA/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lm08uerr/pybm3d_557c119d48954f87be1e5ab440c625a3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lm08uerr/pybm3d_557c119d48954f87be1e5ab440c625a3/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-1117p7c3/install-record.txt --single-version-externally-managed --compile --install-headers /home/yangli/PycharmProjects/Ocr/EDA/include/site/python3.5/pybm3d Check the logs for full command output.

主要问题点在红色标注处

解决方案:

安装:

sudo apt-get install libfftw3-dev

pip3.5 install pybm3d

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值