【发布时间】:2020-03-19 02:59:47
【问题描述】:
我有一些统计结果想导出为 PDF 格式,我搜索了这个网站,似乎使用 FPDF 是一个不错的选择。
我在 Windows 10 下使用 Anaconda,在 Anaconda Prompt 中我输入了Anaconda clouds 中所示的代码:
conda install -c foxbms fpdf
但是出现错误,提示:
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- fpdf -> python[version='>=3.6,<3.7.0a0']
Your python: python=3.7
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.
The following specifications were found to be incompatible with each other:
Package wincertstore conflicts for:
fpdf -> python[version='>=3.6,<3.7.0a0'] -> pip -> setuptools -> wincertstore[version='>=0.2']
python=3.7 -> pip -> setuptools -> wincertstore[version='>=0.2']
Package certifi conflicts for:
python=3.7 -> pip -> setuptools -> certifi[version='>=2016.09|>=2016.9.26']
fpdf -> python[version='>=3.6,<3.7.0a0'] -> pip -> setuptools -> certifi[version='>=2016.09|>=2016.9.26|>=2017.4.17']
Package wheel conflicts for:
fpdf -> python[version='>=3.6,<3.7.0a0'] -> pip -> wheel
python=3.7 -> pip -> wheel
Package setuptools conflicts for:
fpdf -> python[version='>=3.6,<3.7.0a0'] -> pip -> setuptools
python=3.7 -> pip -> setuptools
Package pip conflicts for:
fpdf -> python[version='>=3.6,<3.7.0a0'] -> pip
python=3.7 -> pip
Package ca-certificates conflicts for:
python=3.7 -> openssl[version='>=1.1.1a,<1.1.2a'] -> ca-certificates
fpdf -> python[version='>=3.6,<3.7.0a0'] -> pip -> requests -> urllib3[version='>=1.21.1,<1.24'] -> cryptography[version='>=1.3.4'] -> openssl[version='>=1.1.1a,<1.1.2a'] -> ca-certificates
Package msgpack-python conflicts for:
fpdf -> python[version='>=3.6,<3.7.0a0'] -> pip -> cachecontrol -> msgpack-python
是不是因为我3.7.4的python版本高于要求的3.6?
如果他们有任何安装 FPDF 的解决方案?
谢谢。如果这是一个愚蠢的问题,我深表歉意。
【问题讨论】:
-
是的。这行
python[version='>=3.6,<3.7.0a0']表示该包仅支持 Python 3.6。有很多 Python 包可以处理 pdf 导出,我相信你可以找到替代方案。 -
@orangeInk 谢谢,我会尝试找一些其他的包。
标签: python anaconda fpdf python-3.7