imagehash python library won't install due to libffi dependency

Bug #1898418 reported by Adam Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Steps to reproduce:

pip3 install imagehash

Standard output:

   ERROR: Command errored out with exit status 1:
     command: /home/adam/.pyenv/versions/3.7.2/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-utmdqduu/imagehash/setup.py'"'"'; __file__='"'"'/tmp/pip-install-utmdqduu/imagehash/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 /tmp/pip-pip-egg-info-aak1sa__
         cwd: /tmp/pip-install-utmdqduu/imagehash/
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/setuptools/__init__.py", line 18, in <module>
        from setuptools.dist import Distribution, Feature
      File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/setuptools/dist.py", line 31, in <module>
        from setuptools import windows_support
      File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/setuptools/windows_support.py", line 2, in <module>
        import ctypes
      File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/ctypes/__init__.py", line 7, in <module>
        from _ctypes import Union, Structure, Array
    ImportError: libffi.so.7: cannot open shared object file: No such file or directory
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Logfile

2020-10-04T10:17:33,752 Collecting imagehash
2020-10-04T10:17:33,753 Created temporary directory: /tmp/pip-unpack-nj1u3xsb
2020-10-04T10:17:33,755 Using cached ImageHash-4.1.0.tar.gz (291 kB)
2020-10-04T10:17:33,764 Added imagehash from https://files.pythonhosted.org/packages/1a/5d/cc81830be3c4705a46cdbca74439b67f1017881383ba0127c41c4cecb7b3/ImageHash-4.1.0.tar.gz#sha256=978e25d3df66ae8fa4fb24542e46cea6d0724f02c0c760b2de4931a54d5c7482 to build tracker '/tmp/pip-req-tracker-jayrgcrc'
2020-10-04T10:17:33,764 Running setup.py (path:/tmp/pip-install-khjz0dgm/imagehash/setup.py) egg_info for package imagehash
2020-10-04T10:17:33,764 Created temporary directory: /tmp/pip-pip-egg-info-59aoxqk7
2020-10-04T10:17:33,765 Running command python setup.py egg_info
2020-10-04T10:17:33,848 Traceback (most recent call last):
2020-10-04T10:17:33,848 File "<string>", line 1, in <module>
2020-10-04T10:17:33,848 File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/setuptools/__init__.py", line 18, in <module>
2020-10-04T10:17:33,848 from setuptools.dist import Distribution, Feature
2020-10-04T10:17:33,848 File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/setuptools/dist.py", line 31, in <module>
2020-10-04T10:17:33,848 from setuptools import windows_support
2020-10-04T10:17:33,848 File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/setuptools/windows_support.py", line 2, in <module>
2020-10-04T10:17:33,849 import ctypes
2020-10-04T10:17:33,849 File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/ctypes/__init__.py", line 7, in <module>
2020-10-04T10:17:33,849 from _ctypes import Union, Structure, Array
2020-10-04T10:17:33,849 ImportError: libffi.so.7: cannot open shared object file: No such file or directory
2020-10-04T10:17:33,855 ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
2020-10-04T10:17:33,855 Exception information:
2020-10-04T10:17:33,855 Traceback (most recent call last):
2020-10-04T10:17:33,855 File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 228, in _main
2020-10-04T10:17:33,855 status = self.run(options, args)
2020-10-04T10:17:33,855 File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
2020-10-04T10:17:33,855 return func(self, options, args)
2020-10-04T10:17:33,855 File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 324, in run
2020-10-04T10:17:33,855 reqs, check_supported_wheels=not options.target_dir
2020-10-04T10:17:33,855 File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 183, in resolve
2020-10-04T10:17:33,855 discovered_reqs.extend(self._resolve_one(requirement_set, req))
2020-10-04T10:17:33,855 File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 388, in _resolve_one
2020-10-04T10:17:33,855 abstract_dist = self._get_abstract_dist_for(req_to_install)
2020-10-04T10:17:33,855 File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 340, in _get_abstract_dist_for
2020-10-04T10:17:33,855 discovered_reqs.extend(self._resolve_one(requirement_set, req))
2020-10-04T10:17:33,855 File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 388, in _resolve_one
2020-10-04T10:17:33,855 abstract_dist = self._get_abstract_dist_for(req_to_install)
2020-10-04T10:17:33,855 File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 340, in _get_abstract_dist_for
2020-10-04T10:17:33,855 abstract_dist = self.preparer.prepare_linked_requirement(req)
2020-10-04T10:17:33,855 File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 483, in prepare_linked_requirement
2020-10-04T10:17:33,855 req, self.req_tracker, self.finder, self.build_isolation,
2020-10-04T10:17:33,855 File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 91, in _get_prepared_distribution
2020-10-04T10:17:33,855 abstract_dist.prepare_distribution_metadata(finder, build_isolation)
2020-10-04T10:17:33,855 File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pip/_internal/distributions/sdist.py", line 40, in prepare_distribution_metadata
2020-10-04T10:17:33,855 self.req.prepare_metadata()
2020-10-04T10:17:33,855 File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 555, in prepare_metadata
2020-10-04T10:17:33,855 self.metadata_directory = self._generate_metadata()
2020-10-04T10:17:33,855 File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 535, in _generate_metadata
2020-10-04T10:17:33,855 details=self.name or "from {}".format(self.link)
2020-10-04T10:17:33,855 File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pip/_internal/operations/build/metadata_legacy.py", line 73, in generate_metadata
2020-10-04T10:17:33,855 command_desc='python setup.py egg_info',
2020-10-04T10:17:33,855 File "/home/adam/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pip/_internal/utils/subprocess.py", line 242, in call_subprocess
2020-10-04T10:17:33,855 raise InstallationError(exc_msg)
2020-10-04T10:17:33,855 pip._internal.exceptions.InstallationError: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
2020-10-04T10:17:33,863 Removed imagehash from https://files.pythonhosted.org/packages/1a/5d/cc81830be3c4705a46cdbca74439b67f1017881383ba0127c41c4cecb7b3/ImageHash-4.1.0.tar.gz#sha256=978e25d3df66ae8fa4fb24542e46cea6d0724f02c0c760b2de4931a54d5c7482 from build tracker '/tmp/pip-req-tracker-jayrgcrc'
2020-10-04T10:17:33,863 Removed build tracker: '/tmp/pip-req-tracker-jayrgcrc'

Revision history for this message
Balint Reczey (rbalint) wrote :

This report has very little to do with systemd or with other packaged software.

Changed in systemd (Ubuntu):
status: New → Invalid
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Groovy does not use libffi7, it uses libffi8.

Focal has libffi7 still.

Ideally you should install libffi-dev package and rebuild your pyenv installed packages against matching ABI for your host, as the module you are installing has extensions with binary dependencies, and is not pure python.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.