Skip to content

Will not install on Ubuntu 16.04.6 LTS or 20.10 and Python 3.x #191

@lemire

Description

@lemire
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu Groovy Gorilla (development branch)
Release:	20.10
Codename:	groovy
$ pip3 install libpy
Collecting libpy
  Using cached libpy-0.2.3.tar.gz (177 kB)
Requirement already satisfied: numpy in /home/lemire/.local/lib/python3.8/site-packages (from libpy) (1.19.0)
Building wheels for collected packages: libpy
  Building wheel for libpy (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-un97m7ti/libpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-un97m7ti/libpy/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-8dy4x_qe
       cwd: /tmp/pip-install-un97m7ti/libpy/
  Complete output (100 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  creating build/lib/libpy
  copying libpy/build.py -> build/lib/libpy
  copying libpy/__init__.py -> build/lib/libpy
  creating build/lib/libpy/include
  creating build/lib/libpy/include/libpy
  copying libpy/include/libpy/call_function.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/str_convert.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/itertools.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/autoclass.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/any_vector.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/datetime64.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/dict_range.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/char_sequence.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/exception.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/range.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/to_object.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/autofunction.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/getattr.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/from_object.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/automodule.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/table_details.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/abi.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/demangle.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/devirtualize.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/numpy_utils.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/meta.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/buffer.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/scope_guard.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/any.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/owned_ref.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/hash.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/ndarray_view.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/util.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/stream.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/build_tuple.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/object_map_key.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/gil.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/borrowed_ref.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/singletons.h -> build/lib/libpy/include/libpy
  copying libpy/include/libpy/table.h -> build/lib/libpy/include/libpy
  creating build/lib/libpy/include/libpy/detail
  copying libpy/include/libpy/detail/python.h -> build/lib/libpy/include/libpy/detail
  copying libpy/include/libpy/detail/autoclass_cache.h -> build/lib/libpy/include/libpy/detail
  copying libpy/include/libpy/detail/no_destruct_wrapper.h -> build/lib/libpy/include/libpy/detail
  copying libpy/include/libpy/detail/api.h -> build/lib/libpy/include/libpy/detail
  copying libpy/include/libpy/detail/autoclass_object.h -> build/lib/libpy/include/libpy/detail
  copying libpy/include/libpy/detail/numpy.h -> build/lib/libpy/include/libpy/detail
  copying libpy/_build-and-run -> build/lib/libpy
  copying libpy/_detect-compiler.cc -> build/lib/libpy
  make: Entering directory '/tmp/pip-install-un97m7ti/libpy'
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
  ImportError: No module named numpy
  g++ -std=gnu++17 -g -O3 -fwrapv -fno-strict-aliasing -pipe -march=x86-64 -mtune=generic -fvisibility=hidden -Werror -Wall -Wextra -Wno-register -Wno-missing-field-initializers -Wsign-compare -Wparentheses -Wsuggest-override -Wno-maybe-uninitialized -Waggressive-loop-optimizations -DPY_MAJOR_VERSION=2 -DPY_MINOR_VERSION=7 -DLIBPY_MAJOR_VERSION=0 -DLIBPY_MINOR_VERSION=2 -DLIBPY_MICRO_VERSION=3 -fmax-errors=5 -fstack-protector-strong -flto  -Iinclude/  -I/usr/include  -I/usr/include  -I/usr/include/python2.7  -I/usr/include/python2.7 -MD -fPIC -c src/exception.cc -o src/exception.o
  In file included from include/libpy/exception.h:13,
                   from src/exception.cc:1:
  include/libpy/util.h: In function ‘const char* py::util::pystring_to_cstring(py::borrowed_ref<_object>)’:
  include/libpy/util.h:58:12: error: ‘PyUnicode_AsUTF8’ was not declared in this scope; did you mean ‘PyUnicode_Type’?
     58 |     return PyUnicode_AsUTF8(ob.get());
        |            ^~~~~~~~~~~~~~~~
        |            PyUnicode_Type
  include/libpy/util.h: In function ‘std::string_view py::util::pystring_to_string_view(py::borrowed_ref<_object>)’:
  include/libpy/util.h:71:10: error: ‘PyUnicode_AsUTF8AndSize’ was not declared in this scope; did you mean ‘PyUnicode_AsUTF8String’?
     71 |     cs = PyUnicode_AsUTF8AndSize(ob.get(), &size);
        |          ^~~~~~~~~~~~~~~~~~~~~~~
        |          PyUnicode_AsUTF8String
  make: *** [Makefile:199: src/exception.o] Error 1
  make: Leaving directory '/tmp/pip-install-un97m7ti/libpy'
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-un97m7ti/libpy/setup.py", line 49, in <module>
      setup(
    File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 223, in run
      self.run_command('build')
    File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-un97m7ti/libpy/setup.py", line 36, in run
      raise BuildFailed(
  __main__.BuildFailed: Command 'make -C "/tmp/pip-install-un97m7ti/libpy" libpy/libpy.so' failed with code 512
  ----------------------------------------
  ERROR: Failed building wheel for libpy
  Running setup.py clean for libpy
Failed to build libpy
Installing collected packages: libpy
    Running setup.py install for libpy ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-un97m7ti/libpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-un97m7ti/libpy/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-pi93zmok/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/lemire/.local/include/python3.8/libpy
         cwd: /tmp/pip-install-un97m7ti/libpy/
    Complete output (102 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/libpy
    copying libpy/build.py -> build/lib/libpy
    copying libpy/__init__.py -> build/lib/libpy
    creating build/lib/libpy/include
    creating build/lib/libpy/include/libpy
    copying libpy/include/libpy/call_function.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/str_convert.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/itertools.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/autoclass.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/any_vector.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/datetime64.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/dict_range.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/char_sequence.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/exception.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/range.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/to_object.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/autofunction.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/getattr.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/from_object.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/automodule.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/table_details.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/abi.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/demangle.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/devirtualize.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/numpy_utils.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/meta.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/buffer.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/scope_guard.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/any.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/owned_ref.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/hash.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/ndarray_view.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/util.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/stream.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/build_tuple.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/object_map_key.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/gil.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/borrowed_ref.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/singletons.h -> build/lib/libpy/include/libpy
    copying libpy/include/libpy/table.h -> build/lib/libpy/include/libpy
    creating build/lib/libpy/include/libpy/detail
    copying libpy/include/libpy/detail/python.h -> build/lib/libpy/include/libpy/detail
    copying libpy/include/libpy/detail/autoclass_cache.h -> build/lib/libpy/include/libpy/detail
    copying libpy/include/libpy/detail/no_destruct_wrapper.h -> build/lib/libpy/include/libpy/detail
    copying libpy/include/libpy/detail/api.h -> build/lib/libpy/include/libpy/detail
    copying libpy/include/libpy/detail/autoclass_object.h -> build/lib/libpy/include/libpy/detail
    copying libpy/include/libpy/detail/numpy.h -> build/lib/libpy/include/libpy/detail
    copying libpy/_build-and-run -> build/lib/libpy
    copying libpy/_detect-compiler.cc -> build/lib/libpy
    make: Entering directory '/tmp/pip-install-un97m7ti/libpy'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ImportError: No module named numpy
    g++ -std=gnu++17 -g -O3 -fwrapv -fno-strict-aliasing -pipe -march=x86-64 -mtune=generic -fvisibility=hidden -Werror -Wall -Wextra -Wno-register -Wno-missing-field-initializers -Wsign-compare -Wparentheses -Wsuggest-override -Wno-maybe-uninitialized -Waggressive-loop-optimizations -DPY_MAJOR_VERSION=2 -DPY_MINOR_VERSION=7 -DLIBPY_MAJOR_VERSION=0 -DLIBPY_MINOR_VERSION=2 -DLIBPY_MICRO_VERSION=3 -fmax-errors=5 -fstack-protector-strong -flto  -Iinclude/  -I/usr/include  -I/usr/include  -I/usr/include/python2.7  -I/usr/include/python2.7 -MD -fPIC -c src/exception.cc -o src/exception.o
    In file included from include/libpy/exception.h:13,
                     from src/exception.cc:1:
    include/libpy/util.h: In function ‘const char* py::util::pystring_to_cstring(py::borrowed_ref<_object>)’:
    include/libpy/util.h:58:12: error: ‘PyUnicode_AsUTF8’ was not declared in this scope; did you mean ‘PyUnicode_Type’?
       58 |     return PyUnicode_AsUTF8(ob.get());
          |            ^~~~~~~~~~~~~~~~
          |            PyUnicode_Type
    include/libpy/util.h: In function ‘std::string_view py::util::pystring_to_string_view(py::borrowed_ref<_object>)’:
    include/libpy/util.h:71:10: error: ‘PyUnicode_AsUTF8AndSize’ was not declared in this scope; did you mean ‘PyUnicode_AsUTF8String’?
       71 |     cs = PyUnicode_AsUTF8AndSize(ob.get(), &size);
          |          ^~~~~~~~~~~~~~~~~~~~~~~
          |          PyUnicode_AsUTF8String
    make: *** [Makefile:199: src/exception.o] Error 1
    make: Leaving directory '/tmp/pip-install-un97m7ti/libpy'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-un97m7ti/libpy/setup.py", line 49, in <module>
        setup(
      File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python3.8/distutils/command/install.py", line 589, in run
        self.run_command('build')
      File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/tmp/pip-install-un97m7ti/libpy/setup.py", line 36, in run
        raise BuildFailed(
    __main__.BuildFailed: Command 'make -C "/tmp/pip-install-un97m7ti/libpy" libpy/libpy.so' failed with code 512
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-un97m7ti/libpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-un97m7ti/libpy/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-pi93zmok/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/lemire/.local/include/python3.8/libpy Check the logs for full command output.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions