1

I am trying to install the owlready2 lib in Ubuntu by following the method below but I face a problem.

  • I updated the system and applications
  • Installed Python 3 and made it the working version (default)
  • Installed pip3
  • Used pip and pip3 to install the owlready2 lib

But I faced the below problem which seems to be a problem with the library package:

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

Does anyone have any ideas how to resolve this?

RFAI
  • 459
  • 4
  • 17
  • 1
    can you put the plain text of the output and command properly formatted? It id difficult to read the red-on-black image... – cccnrc Jun 18 '19 at 14:22
  • 1
    Please provide more information, the command you run, result of `which python`, `which pip` commands. Full stacktrace of error you are having. – Andriy Ivaneyko Jun 18 '19 at 14:27
  • @cccnrc did it. – RFAI Jun 18 '19 at 14:29
  • @AndriyIvaneyko I mentioned Python3 and both pip and pip3. Do you want the exact versions? – RFAI Jun 18 '19 at 14:30
  • Yes, versions is good to have to. Also try to upgrade pip itself. – Andriy Ivaneyko Jun 18 '19 at 14:32
  • @AndriyIvaneyko pip3 version comes back as 1.5.4 (python 3.4) and Python comes back as 3.4.3! Now I am a little bit confused myself! – RFAI Jun 18 '19 at 14:36
  • 1
    Checkout https://stackoverflow.com/questions/40832533/pip-or-pip3-to-install-packages-for-python-3 to get idea of what's going on – Andriy Ivaneyko Jun 18 '19 at 14:38
  • @AndriyIvaneyko Just a question: Do you know why I get different versions when I used python --version whereas when I type Python? Are there both Pythons available at the same time on my system? – RFAI Jun 18 '19 at 14:45

2 Answers2

1

Try to install your package with the following command:

python3 -m pip install -I owlready2

If pip3 does not work, you also install Owlready2 manually : download the sources, then run in a terminal:

cd /path/to/Owlready2
python setup.py build 
python setup.py install # as root 

Also, that would be a good ide to install pip3 and try to install your package with pip3, commands below:

curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python3 get-pip.py --user
Andriy Ivaneyko
  • 20,639
  • 6
  • 60
  • 82
0

I encountered the same problem.

It seems that the issue might lie in something that was added in version 0.14 (at the time of writing the newest version is 0.19). If the owlready2 version is newer than 0.13 then you will encounter the problem.

I have tested these Python versions - 3.7.3 (works), 3.6.8(works), 3.5.2(works until v0.13), 3.4.3(works until v0.13)

To install version v0.13 of owlready2:

pip install owlready2==0.13