在Ubuntu中安装OwlReady2(Python lib)时出现问题

2024-06-02 07:39:16 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图按照下面的方法在Ubuntu中安装owlready2lib,但是我遇到了一个问题。在

  • 我更新了系统和应用程序
  • 安装了Python3并使其成为工作版本(默认)
  • 已安装pip3
  • 使用pip和pip3安装owlready2库

但我遇到了以下问题,这似乎是图书馆软件包的问题:

error: can't copy './hermit/org/semanticweb/hermiT/hierarchy': doesn't exist or not a regular file"

Command /usr/bin/python3 -c "import setuptools, tokenize;file='/tmp/pip_buil d_root/owlready2/setup.py';exec(compile(getattr(tokenize, 'open', open)(file ).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-lq v533ik-record/install-record.txt --single-version-externally-managed --compile f ailed with error code 1 in /tmp/pip_build_root/owlready2 Storing debug log for failure in /home/ubuntu/.pip/pip.log

有人知道如何解决这个问题吗?在


Tags: installpipinlogpip3errorrootopen
2条回答

尝试使用以下命令安装软件包:

python3 -m pip install -I owlready2

如果pip3不工作,您还可以手动安装Owlready2:下载源代码,然后在终端中运行:

^{pr2}$

另外,这将是一个很好的ide来安装pip3并尝试使用pip3安装包,命令如下:

curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python3 get-pip.py  user

我也遇到了同样的问题。在

似乎问题可能出在0.14版本中添加的东西(在编写最新版本时是0.19)。如果owlready2版本比0.13更新,那么您将遇到问题。在

我测试了这些Python版本-3.7.3(works)、3.6.8(works)、3.5.2(v0.13之前有效)、3.4.3(v0.13之前有效)

要安装owlready2的v0.13版本:

pip install owlready2==0.13

相关问题 更多 >