Python 告警 DEPRECATION: gpg 1.16.0-unknown has a non-standard version number
DEPRECATION: gpg 1.16.0-unknown has a non-standard version number. pip 23.3 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of gpg or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at https://github.com/pypa/pip/issues/12063
pip install --upgrade gpg
报错:
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
Could not find gpgme-config. Please install the libgpgme development package.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
解决:
sudo apt install libgpgme-dev
告警:
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [2 lines of output]
Using gpgme.h from /usr/include/gpgme.h
error: command 'swig' failed: No such file or directory
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for gpg
Running setup.py clean for gpg
Failed to build gpg
解决:
sudo apt install swig
告警:
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
Using gpgme.h from /usr/include/gpgme.h
build/gpgme.h:434: Warning 302: Identifier '_gpgme_sig_notation' redefined (ignored),
build/gpgme.i:580: Warning 302: previous definition of '_gpgme_sig_notation'.
build/gpgme.h:487: Warning 451: Setting a const char * variable may leak memory.
build/gpgme_wrap.c:155:11: fatal error: Python.h: 没有那个文件或目录
155 | # include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/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 gpg
Running setup.py clean for gpg
Failed to build gpg
ERROR: Could not build wheels for gpg, which is required to install pyproject.toml-based projects
解决:
sudo apt install python3-dev