Skip to content

Python.h, cffi error #6847

@Arr0w228

Description

@Arr0w228
Number of Klipper instances to set up (default=1):
Create example printer.cfg? (Y/n):
Cloning repository from 'https://github.com/Klipper3d/klipper'

Клонирование в «/home/arrow/klipper»...
remote: Enumerating objects: 72375, done.
remote: Counting objects: 100% (107/107), done.
remote: Compressing objects: 100% (59/59), done.
remote: Total 72375 (delta 84), reused 48 (delta 48), pack-reused 72268 (from 2)
Получение объектов: 100% (72375/72375), 205.81 МиБ | 2.39 МиБ/с, готово.
Определение изменений: 100% (58547/58547), готово.
[OK] Clone successful!
Уже на «master»
Эта ветка соответствует «origin/master».
[OK] Checkout successful!

Installing dependencies ...

[INFO] The following packages need installation:
● libusb-1.0
[sudo] пароль для arrow:
Чтение списков пакетов… Готово
Построение дерева зависимостей… Готово
Чтение информации о состоянии… Готово
Заметьте, выбирается «libusb-1.0-0-dev» для регулярного выражения «libusb-1.0»
Заметьте, выбирается «libusb-1.0-doc» для регулярного выражения «libusb-1.0»
Заметьте, выбирается «libusb-1.0-0» для регулярного выражения «libusb-1.0»
Уже установлен пакет libusb-1.0-0 самой новой версии (2:1.0.27-2).
Уже установлен пакет libusb-1.0-0-dev самой новой версии (2:1.0.27-2).
Уже установлен пакет libusb-1.0-doc самой новой версии (2:1.0.27-2).
Следующие пакеты устанавливались автоматически и больше не требуются:
aspnetcore-runtime-6.0 aspnetcore-targeting-pack-6.0 base58 dotnet-apphost-pack-6.0 dotnet-host dotnet-hostfxr-6.0 dotnet-runtime-6.0 dotnet-runtime-deps-6.0 dotnet-sdk-6.0 dotnet-targeting-pack-6.0
faraday-agent-dispatcher gir1.2-vte-2.91 greenbone-feed-sync gvmd gvmd-common hyphen-en-us libdlt2 liblzf1 libmosquitto1 libopusfile0 libportmidi0 libsdl2-image-2.0-0 libsdl2-mixer-2.0-0 libsdl2-ttf-2.0-0 libxar1
mosquitto netstandard-targeting-pack-2.1 notus-scanner nsis nsis-common openvas-scanner ospd-openvas pgcli python3-alembic python3-altgraph python3-amqp python3-antlr4 python3-apispec-webframeworks python3-base58
python3-bidict python3-billiard python3-bleach python3-cbor python3-celery python3-cli-helpers python3-click-didyoumean python3-click-repl python3-cmd2 python3-configobj python3-croniter python3-cvss
python3-docopt python3-dropbox python3-ecdsa python3-elasticsearch python3-engineio python3-ephem python3-faraday-agent-parameters-types python3-faraday-plugins python3-feedparser python3-filedepot
python3-filteralchemy python3-flask-celery-helper python3-flask-classful python3-flask-kvsession python3-flask-limiter python3-flask-login python3-flask-mail python3-flask-principal python3-flask-socketio
python3-flask-sqlalchemy python3-flaskext.wtf python3-flatbuffers python3-geoip python3-geoip2 python3-gevent python3-gevent-websocket python3-gnupg python3-gvm python3-html2text python3-humanize python3-jq
python3-jwcrypto python3-kombu python3-log-symbols python3-macholib python3-markdown2 python3-marshmallow-sqlalchemy python3-maxminddb python3-mnemonic python3-nplusone python3-obfuscator python3-ordered-set
python3-paho-mqtt python3-pgspecial python3-png python3-psycogreen python3-psycopg python3-psycopg-c python3-py-sneakers python3-pydispatch python3-pydyf python3-pygame python3-pyinstaller
python3-pyinstaller-hooks-contrib python3-pymysql python3-pyotp python3-pyphen python3-pyqrcode python3-pyvnc python3-secretsocks python3-setproctitle python3-sgmllib3k python3-sh python3-shtab
python3-simple-rest-client python3-simplekv python3-slugify python3-snappy python3-socketio python3-spinners python3-sqlalchemy-schemadisplay python3-sqlalchemy-utc python3-standard-imghdr python3-status
python3-stix2 python3-stix2-patterns python3-stone python3-syslog-rfc5424-formatter python3-trie python3-txaio python3-u-msgpack python3-ubjson python3-unidecode python3-validators python3-vine python3-websockify
python3-wsaccel python3-wtforms python3-xlrd python3-xlutils python3-xlwt python3-zapv2 python3-zlib-wrapper python3-zope.event redis-server redis-tools starkiller xar
Для их удаления используйте «sudo apt autoremove».
Обновлено 0 пакетов, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено.
[OK] Packages successfully installed.

Set up Python virtual environment ...

created virtual environment CPython3.12.9.final.0-64 in 482ms
creator CPython3Posix(dest=/home/arrow/klippy-env, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, via=copy, app_data_dir=/home/arrow/.local/share/virtualenv)
added seed packages: pip==25.0
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
[OK] Setup of virtualenv successful!

Updating pip ...

Requirement already satisfied: pip in /home/arrow/klippy-env/lib/python3.12/site-packages (25.0)
Collecting pip
Using cached pip-25.0.1-py3-none-any.whl.metadata (3.7 kB)
Using cached pip-25.0.1-py3-none-any.whl (1.8 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 25.0
Uninstalling pip-25.0:
Successfully uninstalled pip-25.0
Successfully installed pip-25.0.1
[OK] Updating pip successful!

Installing Python requirements ...

Ignoring greenlet: markers 'python_version < "3.12"' don't match your environment
Collecting cffi==1.14.6 (from -r /home/arrow/klipper/scripts/klippy-requirements.txt (line 5))
Using cached cffi-1.14.6.tar.gz (475 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting pyserial==3.4 (from -r /home/arrow/klipper/scripts/klippy-requirements.txt (line 6))
Using cached pyserial-3.4-py2.py3-none-any.whl.metadata (1.6 kB)
Collecting greenlet==3.0.3 (from -r /home/arrow/klipper/scripts/klippy-requirements.txt (line 8))
Using cached greenlet-3.0.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.metadata (3.8 kB)
Collecting Jinja2==2.11.3 (from -r /home/arrow/klipper/scripts/klippy-requirements.txt (line 9))
Using cached Jinja2-2.11.3-py2.py3-none-any.whl.metadata (3.5 kB)
Collecting python-can==3.3.4 (from -r /home/arrow/klipper/scripts/klippy-requirements.txt (line 10))
Using cached python_can-3.3.4-py2.py3-none-any.whl
Collecting markupsafe==1.1.1 (from -r /home/arrow/klipper/scripts/klippy-requirements.txt (line 11))
Using cached markupsafe-1.1.1-py3-none-any.whl
Collecting setuptools==75.6.0 (from -r /home/arrow/klipper/scripts/klippy-requirements.txt (line 12))
Using cached setuptools-75.6.0-py3-none-any.whl.metadata (6.7 kB)
Collecting pycparser (from cffi==1.14.6->-r /home/arrow/klipper/scripts/klippy-requirements.txt (line 5))
Using cached pycparser-2.22-py3-none-any.whl.metadata (943 bytes)
Collecting wrapt~=1.10 (from python-can==3.3.4->-r /home/arrow/klipper/scripts/klippy-requirements.txt (line 10))
Using cached wrapt-1.17.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.4 kB)
Collecting aenum (from python-can==3.3.4->-r /home/arrow/klipper/scripts/klippy-requirements.txt (line 10))
Using cached aenum-3.1.15-py3-none-any.whl.metadata (3.7 kB)
Using cached pyserial-3.4-py2.py3-none-any.whl (193 kB)
Using cached greenlet-3.0.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (625 kB)
Using cached Jinja2-2.11.3-py2.py3-none-any.whl (125 kB)
Using cached setuptools-75.6.0-py3-none-any.whl (1.2 MB)
Using cached wrapt-1.17.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (89 kB)
Using cached aenum-3.1.15-py3-none-any.whl (137 kB)
Using cached pycparser-2.22-py3-none-any.whl (117 kB)
Building wheels for collected packages: cffi
Building wheel for cffi (pyproject.toml) ... error
Failed to build cffi
error: subprocess-exited-with-error

× Building wheel for cffi (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [33 lines of output]
running bdist_wheel
running build
running build_py
creating build/lib.linux-x86_64-cpython-312/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-cpython-312/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-cpython-312/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-cpython-312/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-cpython-312/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-cpython-312/cffi
copying cffi/pkgconfig.py -> build/lib.linux-x86_64-cpython-312/cffi
copying cffi/model.py -> build/lib.linux-x86_64-cpython-312/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-cpython-312/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-cpython-312/cffi
copying cffi/error.py -> build/lib.linux-x86_64-cpython-312/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-cpython-312/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-cpython-312/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-cpython-312/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-cpython-312/cffi
copying cffi/api.py -> build/lib.linux-x86_64-cpython-312/cffi
copying cffi/init.py -> build/lib.linux-x86_64-cpython-312/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-cpython-312/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-cpython-312/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-cpython-312/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-cpython-312/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-cpython-312/c
x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/home/arrow/klippy-env/include -I/usr/include/python3.12 -c c/_cffi_backend.c -o build/temp.linux-x86_64-cpython-312/c/_cffi_backend.o
c/_cffi_backend.c:2:10: fatal error: Python.h: Нет такого файла или каталога
2 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cffi
ERROR: Failed to build installable wheels for some pyproject.toml based projects (cffi)

[ERROR] Error installing Python requirements: Installing Python requirements failed!
[ERROR] Error during installation of Klipper requirements!
[ERROR] Error installing Python requirements: Installing Python requirements failed!
[ERROR] Klipper installation failed!

Metadata

Metadata

Assignees

No one assigned

    Labels

    not on githubNot a topic tracked on github

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions