Closed leecbaker closed 3 years ago
Hello!
Any idea why this symbol is used but is not in libffi?
That’s actually a problem with cffi’s wheel. If you’ve updated your system recently, you probably should reinstall cffi. And if it doesn’t work for some reason, pip install cffi --no-binary :all:
seems to be the latest solution that will definitely work.
@liZe, thanks for your help. Unfortunately, I tried this previously and it didn't help.
If you’ve updated your system recently, you probably should reinstall cffi.
This is a brand new system, less than a week old. Everything has been installed from scratch in the past couple of days.
the latest solution that will definitely work.
Unfortunately, this didn't work:
> pip install cffi --no-binary :all:
Requirement already satisfied: cffi in ./.venv/lib/python3.9/site-packages (1.14.6)
Requirement already satisfied: pycparser in ./.venv/lib/python3.9/site-packages (from cffi) (2.20)
> pip uninstall cffi
Found existing installation: cffi 1.14.6
Uninstalling cffi-1.14.6:
Would remove:
./project/.venv/lib/python3.9/site-packages/_cffi_backend.cpython-39-darwin.so
./project/.venv/lib/python3.9/site-packages/cffi-1.14.6.dist-info/*
./project/.venv/lib/python3.9/site-packages/cffi/*
Proceed (Y/n)? y
Successfully uninstalled cffi-1.14.6
> pip install cffi --no-binary :all:
Collecting cffi
Using cached cffi-1.15.0.tar.gz (484 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: pycparser in ./.venv/lib/python3.9/site-packages (from cffi) (2.20)
Skipping wheel build for cffi, due to binaries being disabled for it.
Installing collected packages: cffi
Running setup.py install for cffi ... done
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
weasyprint 52.5 requires cairocffi>=0.9.0, which is not installed.
Successfully installed cffi-1.15.0
(project) ➜ project git:(a-branch) ✗ pip install cairocffi --no-binary :all:
Collecting cairocffi
Downloading cairocffi-1.3.0.tar.gz (88 kB)
|████████████████████████████████| 88 kB 6.7 MB/s
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: ./project/.venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/34/ff08ny7j04g540qfn_rhnnp80000gn/T/pip-install-ku135qxk/cairocffi_9590ab2329c74a679626677ffb4c7d9a/setup.py'"'"'; __file__='"'"'/private/var/folders/34/ff08ny7j04g540qfn_rhnnp80000gn/T/pip-install-ku135qxk/cairocffi_9590ab2329c74a679626677ffb4c7d9a/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 /private/var/folders/34/ff08ny7j04g540qfn_rhnnp80000gn/T/pip-pip-egg-info-n9nk2_dl
cwd: /private/var/folders/34/ff08ny7j04g540qfn_rhnnp80000gn/T/pip-install-ku135qxk/cairocffi_9590ab2329c74a679626677ffb4c7d9a/
Complete output (29 lines):
./project/.venv/lib/python3.9/site-packages/setuptools/__init__.py:148: SetuptoolsDeprecationWarning: setup_requires is deprecated. Supply build dependencies using PEP 517 pyproject.toml build-requires.
warnings.warn(
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/34/ff08ny7j04g540qfn_rhnnp80000gn/T/pip-install-ku135qxk/cairocffi_9590ab2329c74a679626677ffb4c7d9a/setup.py", line 10, in <module>
setup(
File "./project/.venv/lib/python3.9/site-packages/setuptools/__init__.py", line 159, in setup
return distutils.core.setup(**attrs)
File "/Users/lee/.pyenv/versions/3.9.7/lib/python3.9/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "./project/.venv/lib/python3.9/site-packages/setuptools/dist.py", line 453, in __init__
_Distribution.__init__(
File "/Users/lee/.pyenv/versions/3.9.7/lib/python3.9/distutils/dist.py", line 292, in __init__
self.finalize_options()
File "./project/.venv/lib/python3.9/site-packages/setuptools/dist.py", line 831, in finalize_options
ep(self)
File "./project/.venv/lib/python3.9/site-packages/setuptools/dist.py", line 852, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "./project/.venv/lib/python3.9/site-packages/cffi/setuptools_ext.py", line 219, in cffi_modules
add_cffi_module(dist, cffi_module)
File "./project/.venv/lib/python3.9/site-packages/cffi/setuptools_ext.py", line 49, in add_cffi_module
execfile(build_file_name, mod_vars)
File "./project/.venv/lib/python3.9/site-packages/cffi/setuptools_ext.py", line 25, in execfile
exec(code, glob, glob)
File "cairocffi/ffi_build.py", line 28, in <module>
ffi = FFI()
File "./project/.venv/lib/python3.9/site-packages/cffi/api.py", line 48, in __init__
import _cffi_backend as backend
ImportError: dlopen(./project/.venv/lib/python3.9/site-packages/_cffi_backend.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_ffi_prep_closure'
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/8b/d2/137b346d64f0d6428a90f60b51a06706592a86b74fd21ff66c853537cb9b/cairocffi-1.3.0.tar.gz#sha256=108a3a7cb09e203bdd8501d9baad91d786d204561bd71e9364e8b34897c47b91 (from https://pypi.org/simple/cairocffi/) (requires-python:>=3.7). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading cairocffi-1.2.0.tar.gz (70 kB)
|████████████████████████████████| 70 kB 21.4 MB/s
Preparing metadata (setup.py) ... error
Unfortunately, this didn't work:
Hmmmm, sorry to hear that. Then you’ll probably have to ping the CFFI maintainers, because the problem is not in CairoCFFI and I’ll be totally incompetent to help you about this kind of problems 😉. That’s exactly the same problem as the one linked above, I suppose that they’ll give you a solution that really works for you 🤞.
While installing cairocffi, I'm encountering this runtime linking error. It appears that
Looking a bit more into which version of libffi is being used:
This was installed by homebrew.
Any idea why this symbol is used but is not in libffi?