您好,欢迎来到爱玩科技网。
搜索
您的当前位置:首页pip install error

pip install error

来源:爱玩科技网

安装SEC,DSRG三维CRF时,问题:

ubuntu@fadfd17f190d:~/user_space/SGAN$ pip3 install CRF/
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing ./CRF
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3.5 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-6j6vk0ud/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-6j6vk0ud/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /tmp/pip-req-build-6j6vk0ud/
    Complete output (20 lines):

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
    # distutils: sources = src/densecrf_wrapper.cpp
    ^
    ------------------------------------------------------------

    krahenbuhl2013/wrapper.pyx:1:0: 'krahenbuhl2013/wrapper' is not a valid module name
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-6j6vk0ud/setup.py", line 32, in <module>
        language="c++",
      File "/usr/local/lib/python3.5/dist-packages/Cython/Build/Dependencies.py",line 1097, in cythonize
        cythonize_one(*args)
      File "/usr/local/lib/python3.5/dist-packages/Cython/Build/Dependencies.py",line 1220, in cythonize_one
        raise CompileError(None, pyx_file)
    Cython.Compiler.Errors.CompileError: krahenbuhl2013/wrapper.pyx
    Compiling krahenbuhl2013/wrapper.pyx because it changed.
    [1/1] Cythonizing krahenbuhl2013/wrapper.pyx
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check thelogs for full command output.

解决:将CRF/setup.py 修改:

setup(
    name='CRF',
    version=1.0,
    packages=['krahenbuhl2013'],
    ext_modules=cythonize(Extension(
        #'krahenbuhl2013/wrapper',
        'wrapper',  //修改位置
        sources=[
            'krahenbuhl2013/wrapper.pyx',
            "src/densecrf.cpp",
            "src/labelcompatibility.cpp",
            "src/pairwise.cpp",
            "src/permutohedral.cpp",
            "src/unary.cpp",
            "src/util.cpp",
            "src/densecrf_wrapper.cpp",
        ],
        include_dirs=[
            numpy.get_include(),
            "include",
            "/usr/include/eigen3",

 

 

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- aiwanbo.com 版权所有 赣ICP备2024042808号-3

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务