标签: pip-compile

尝试调用 get_requires_for_build_sdist 时出现错误后端子进程退出

我正在创建一个 Python 库,我需要编译 pyproject.toml 文件。

我运行了这个命令:

pip-compile pyproject.toml --resolver=backtracking

我有:

尝试调用 get_requires_for_build_wheel 时后端子进程退出无法解析 .\pyproject.toml

我的 pyproject.toml:

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "filedump"
version = "1.0.0"
description = "Save multiple values to a .svf file (not encrypted)"
readme = "README.md"
authors = [{ name = "------", email = "-------------------" }]
license = { file = "LICENSE" }
classifiers = [
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python",
    "Programming Language :: Python :: …
Run Code Online (Sandbox Code Playgroud)

python pip pip-tools pip-compile

6
推荐指数
1
解决办法
3569
查看次数

收到“错误:在 --require-hashes 模式下,所有需求都必须固定其版本”

我想使用 SHA256 哈希来安装 pip 包,并且我将所有依赖项固定在requirements.in这样的位置

apache-beam[gcp]==2.38.0
beautifulsoup4==4.10.0
bleach==4.1.0
certifi==2021.5.30
deepdiff==5.8.1
defusedxml==0.7.1
elasticsearch==7.17.0
firebase-admin==5.2.0
future==0.18.2
googledatastore==7.0.2
google-cloud-storage==2.1.0
google-auth==1.35.0
google-cloud-dataflow-client==0.3.1
google-cloud-logging==3.0.0
google-cloud-ndb==1.11.1
google-cloud-secret-manager==2.12.4
google-cloud-tasks==2.7.2
google-cloud-translate==3.6.1
gunicorn==20.1.0
html5lib==1.1
mailchimp3==3.0.15
mutagen==1.45.1
pillow==9.0.1
pylatexenc==2.10
pytest==6.2.5
PyYAML==6.0
redis==3.5.3
requests==2.26.0
requests-mock==1.9.3
requests-toolbelt==0.9.1
result==0.6.0
rsa==4.7.2
simplejson==3.17.5
six==1.16.0
soupsieve==2.3.1
typing-extensions==3.10.0.2
urllib3==1.26.7
webapp2==3.0.0b1
webencodings==0.5.1
Run Code Online (Sandbox Code Playgroud)

仅供参考,我正在使用 pip 22.1.1、python 3.8.15 和 pip-compile 6.6.2。为了生成哈希,我使用了pip-compile --generate-hashes requirements.in然后pip install --require-hashes -r requirements.txt启用哈希验证。但我收到这样的错误:

ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
    google-api-core[grpc]<3.0.0dev,>=1.22.1 …
Run Code Online (Sandbox Code Playgroud)

pip requirements.txt python-3.8 pip-compile

3
推荐指数
1
解决办法
2696
查看次数