treyhunner / names

Random name generator
MIT License
462 stars 107 forks source link

Install fails with ImportError: libffi.so.8 #29

Open pwrightkcl opened 3 years ago

pwrightkcl commented 3 years ago

I cannot pip3 install names using my installation of Python in ~/.local. This is on a shared server where I do not have sudo rights.

Traceback:

    ERROR: Command errored out with exit status 1:
     command: ~/.local/bin/python3.9 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-m_hsb0te/names_488bf7a692d74f8ebbafd73ee2e1c6ec/setup.py'"'"'; __file__='"'"'/tmp/pip-install-m_hsb0te/names_488bf7a692d74f8ebbafd73ee2e1c6ec/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-fmowhd7g
         cwd: /tmp/pip-install-m_hsb0te/names_488bf7a692d74f8ebbafd73ee2e1c6ec/
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "~/.local/lib/python3.9/site-packages/setuptools/__init__.py", line 18, in <module>
        from setuptools.dist import Distribution
      File "~/.local/lib/python3.9/site-packages/setuptools/dist.py", line 34, in <module>
        from setuptools import windows_support
      File "~/.local/lib/python3.9/site-packages/setuptools/windows_support.py", line 2, in <module>
        import ctypes
      File "~/.local/lib/python3.9/ctypes/__init__.py", line 8, in <module>
        from _ctypes import Union, Structure, Array
    ImportError: libffi.so.8: cannot open shared object file: No such file or directory
    ----------------------------------------

I'm not sure if this is specific to names or not, so feel free to close the issue, preferably redirecting me. It looks like libffi is in my .local directory, but pip isn't finding it.

$ ls -l ~/.local/lib/*libffi*
-rw-r--r-- 1 ... libffi.a
-rwxr-xr-x 1 ... libffi.la
lrwxrwxrwx 1 ...libffi.so -> libffi.so.8.1.0
lrwxrwxrwx 1 ... libffi.so.8 -> libffi.so.8.1.0
-rwxr-xr-x 1 ... libffi.so.8.1.0

[Edit: replaced my actual home directory with ~ for readability and possibly privacy]