Skip to content

error CODEC2_MODE_1400 and CODEC2_MODE_450 undeclared #8

Closed
@raoniluar

Description

@raoniluar

I'm using Ubuntu 18.04 and I tried to install pycodec2 in two different ways.

First, I installed codec2 with:

sudo apt install libcodec2-dev

Then, I tried to install pycodec2 with:

python3 setup.py install

And I get this error:

Collecting pycodec2
  Downloading https://files.pythonhosted.org/packages/a9/04/2002d37f184815f33bf7c7aa23227f4a522d4050497a27249dd47d91a435/pycodec2-1.0.4.tar.gz (64kB)
    100% |████████████████████████████████| 71kB 856kB/s 
Installing collected packages: pycodec2
  Running setup.py install for pycodec2 ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-13hoywvk/pycodec2/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-d550qjrh-record/install-record.txt --single-version-externally-managed --compile:
    /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
      warnings.warn(msg)
    running install
    running build
    running build_py
    package init file 'pycodec2/__init__.py' not found (or not a regular file)
    running build_ext
    skipping 'pycodec2/pycodec2.c' Cython extension (up-to-date)
    building 'pycodec2' extension
    creating build
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/pycodec2
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include/python3.6m -c pycodec2/pycodec2.c -o build/temp.linux-x86_64-3.6/pycodec2/pycodec2.o
    In file included from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1832:0,
                     from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                     from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from pycodec2/pycodec2.c:607:
    /usr/local/lib/python3.6/dist-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 " \
      ^~~~~~~
    pycodec2/pycodec2.c: In function ‘__pyx_pymod_exec_pycodec2’:
    pycodec2/pycodec2.c:6766:36: error: ‘CODEC2_MODE_450’ undeclared (first use in this function); did you mean ‘CODEC2_MODE_1400’?
       __pyx_t_2 = __Pyx_PyInt_From_int(CODEC2_MODE_450); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error)
                                        ^~~~~~~~~~~~~~~
                                        CODEC2_MODE_1400
    pycodec2/pycodec2.c:6766:36: note: each undeclared identifier is reported only once for each function it appears in
    pycodec2/pycodec2.c:6778:36: error: ‘CODEC2_MODE_450PWB’ undeclared (first use in this function); did you mean ‘CODEC2_MODE_450’?
       __pyx_t_2 = __Pyx_PyInt_From_int(CODEC2_MODE_450PWB); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
                                        ^~~~~~~~~~~~~~~~~~
                                        CODEC2_MODE_450
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-13hoywvk/pycodec2/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-d550qjrh-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-13hoywvk/pycodec2/

When I use this command instead:

sudo pip3 install pycodec2

I get the same error before.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions