gpt4 book ai didi

python - 安装 python 模块 (pbr) 时出现问题

转载 作者:太空宇宙 更新时间:2023-11-04 00:46:46 24 4
gpt4 key购买 nike

我刚刚发现 CKAn,我正在尝试将它安装在 Ubuntu 14.04 上。我从源代码安装它。

下一步我们必须安装 CKAn 所需的 Python 模块。

pip install -r /usr/lib/ckan/default/src/ckan/requirements.txt

我第一次遇到错误

Command python setup.py egg_info failed with error code 1 in /usr/lib/ckan/default/build/html5lib

我通过升级setuptools解决了

pip install --upgrade setuptools

但是现在我在 pbr 上遇到了一个新的错误,我不知道该怎么办

Command python setup.py egg_info failed with error code 1 in /usr/lib/ckan/default/build/pbr

在结束安装并显示该错误之前,我收到了该消息:

Downloading/unpacking pbr==0.11.0 (from -r /usr/lib/ckan/default/src/ckan/requirements.txt (line 27)) Running setup.py egg_info for package pbr Traceback (most recent call last): File "", line 14, in File "/usr/lib/ckan/default/build/pbr/setup.py", line 22, in **util.cfg_to_args()) File "pbr/util.py", line 261, in cfg_to_args wrap_commands(kwargs) File "pbr/util.py", line 482, in wrap_commands for cmd, _ in dist.get_command_list(): File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/setuptools/dist.py", line 528, in get_command_list cmdclass = ep.resolve() File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2255, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "pbr/testr_command.py", line 47, in from testrepository import commands ImportError: No module named testrepository Complete output from command python setup.py egg_info: Traceback (most recent call last):

File "", line 14, in

File "/usr/lib/ckan/default/build/pbr/setup.py", line 22, in

**util.cfg_to_args())

File "pbr/util.py", line 261, in cfg_to_args

wrap_commands(kwargs)

File "pbr/util.py", line 482, in wrap_commands

for cmd, _ in dist.get_command_list():

File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/setuptools/dist.py", line 528, in get_command_list

cmdclass = ep.resolve()

File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2255, in resolve

module = __import__(self.module_name, fromlist=['__name__'], level=0)

File "pbr/testr_command.py", line 47, in

from testrepository import commands

ImportError: No module named testrepository

有人可以帮我完成安装吗?非常感谢您的帮助

最佳答案

这对我有用:

  1. 通过pip uninstall pbr卸载之前的pbr版本。

  2. 从需求文件中删除了版本:/usr/lib/ckan/default/src/ckan/requirements.txt 这一行 pbr==0.11.0 通过这一行 pbr

  3. 再次安装需求pip install -r/usr/lib/ckan/default/src/ckan/requirements.txt

关于python - 安装 python 模块 (pbr) 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39225976/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com