基本上,我遇到的问题是我的包裹需要同时使用click
和click-default-group
。但是,在构建过程中,当ReadTheDocs尝试安装click
时,它将最终安装click-default-group
,然后产生一个从未安装click
的错误:
Searching for click_default_group
Reading https://pypi.org/simple/click_default_group/
Downloading https://files.pythonhosted.org/packages/86/3e/389d8bbe3033613b17ce4136dbcf3e69c785c9c54d08f3adb95336b52040/click-default-group-1.2.tar.gz#sha256=ba8c43d9c384e1ea7127484c5fc8f4e1ca759519a64fff10718d53f4b82c412a
Best match: click-default-group 1.2
Processing click-default-group-1.2.tar.gz
Writing /tmp/easy_install-eo0ffsj2/click-default-group-1.2/setup.cfg
Running click-default-group-1.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-eo0ffsj2/click-default-group-1.2/egg-dist-tmp-lwzhnf1c
zip_safe flag not set; analyzing archive contents...
Moving click_default_group-1.2-py3.5.egg to /home/docs/checkouts/readthedocs.org/user_builds/freqgen/envs/latest/lib/python3.5/site-packages
Adding click-default-group 1.2 to easy-install.pth file
Installed /home/docs/checkouts/readthedocs.org/user_builds/freqgen/envs/latest/lib/python3.5/site-packages/click_default_group-1.2-py3.5.egg
...
Searching for click
Downloading https://files.pythonhosted.org/packages/86/3e/389d8bbe3033613b17ce4136dbcf3e69c785c9c54d08f3adb95336b52040/click-default-group-1.2.tar.gz#sha256=ba8c43d9c384e1ea7127484c5fc8f4e1ca759519a64fff10718d53f4b82c412a
Best match: click default-group-1.2
Processing click-default-group-1.2.tar.gz
Writing /tmp/easy_install-sti3nr59/click-default-group-1.2/setup.cfg
Running click-default-group-1.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-sti3nr59/click-default-group-1.2/egg-dist-tmp-58ldag5e
zip_safe flag not set; analyzing archive contents...
Removing /home/docs/checkouts/readthedocs.org/user_builds/freqgen/envs/latest/lib/python3.5/site-packages/click_default_group-1.2-py3.5.egg
Moving click_default_group-1.2-py3.5.egg to /home/docs/checkouts/readthedocs.org/user_builds/freqgen/envs/latest/lib/python3.5/site-packages
click-default-group 1.2 is already the active version in easy-install.pth
Installed /home/docs/checkouts/readthedocs.org/user_builds/freqgen/envs/latest/lib/python3.5/site-packages/click_default_group-1.2-py3.5.egg
error: The 'click' distribution was not found and is required by click-default-group, freqgen
可以看出,它说click
的最佳匹配是click default-group-1.2
,不是。
作为参考,完整的构建日志可以在here中看到。
答案 0 :(得分:0)
因此,我通过指定要使用的click
的确切版本来解决了这个问题:
Searching for click>=6.7
Reading https://pypi.org/simple/click/
Downloading https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl#sha256=29f99fc6125fbc931b758dc053b3114e55c77a6e4c6c3a2674a2dc986016381d
Best match: click 6.7
Processing click-6.7-py2.py3-none-any.whl
Installing click-6.7-py2.py3-none-any.whl to /home/docs/checkouts/readthedocs.org/user_builds/freqgen/envs/latest/lib/python3.5/site-packages
Adding click 6.7 to easy-install.pth file
不知道问题的根源,但似乎可以解决。