Issues in installation in Python 3.10

3644 views
Skip to first unread message

Parthasarathi Mukhopadhyay

unread,
Apr 24, 2022, 3:55:25 PMApr 24
to Annif Users

Dear all

I just switched over in my laptop from Ubuntu 20.04 to Ubuntu 22.04 (includes Python 3.10.4).

1, Annif got installed without any issue and so are the cases with libpython3-dev,

nltk.downloader punkt and annif[fasttext];

2. It is giving error for annif[omikuji]

Installing collected packages: omikuji
  Running setup.py install for omikuji ... error
  error: subprocess-exited-with-error
 
  × Running setup.py install for omikuji did not run successfully.
  │ exit code: 1
  ╰─> [9 lines of output]
      running install
      /home/roshni/annif/annif-venv/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build/lib
      creating build/lib/omikuji
      copying python-wrapper/omikuji/__init__.py -> build/lib/omikuji
      error: [Errno 2] No such file or directory: 'cargo'
      [end of output]
 
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> omikuji

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

3. Error for pip install annif[nn]

note: This error originates from a subprocess, and is likely not a problem with pip.
      error: legacy-install-failure
     
      × Encountered error while trying to install package.
      ╰─> numpy
     
      note: This is an issue with the package mentioned above, not pip.
      hint: See above for output from the failure.
      [end of output]
 
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
(

annif-venv) roshni@roshni-HP-Pavilion-Laptop-14-dv0xxx:~/annif$ pip install numpy
Requirement already satisfied: numpy in ./annif-venv/lib/python3.10/site-packages (1.21.6)


Annif commands and web services are working just fine.

Thanks and regards


Parthasarathi Mukhopadhyay

Professor, Department of Library and Information Science,

University of Kalyani, Kalyani - 741 235 (WB), India

juho.i...@helsinki.fi

unread,
Apr 26, 2022, 6:12:15 AMApr 26
to Annif Users
Thanks for reporting! This needs to be taken care of.

I created a GitHub issue for the Python 3.10 support. Unfortunately there seemed to a couple of things that prevent using the current Annif release (0.57) on Python 3.10, and before next Annif release a closer look needs to be taken on at least Omikuji, as I did not manage to install it on Python 3.10 in any way.

In the meantime, to use Annif on Ubuntu 22.04, I see at least these options:
- Install an older version of Python to use with Annif
- Use Annif via Docker image (see Wiki and/or tutorial)

Also you could try to get Omikuji working on Python 3.10 by installing first cargo. For my environment (Python 3.10 in Docker image) it was not enough, but maybe on full Ubuntu 22.04 system it is.

-Juho

Parthasarathi Mukhopadhyay

unread,
Apr 27, 2022, 12:51:13 PMApr 27
to Annif Users
Thanks, I do understand the issue now after reading the PR.

Meanwhile, I switched to Python 3.8, installed Annif happily again, and then switched back to Python 3.10 again (as I've observed some issues in opening terminal, update/upgrade etc with Python 3.8 in Ubuntu 22.04).

All set now.

One more question - if I wish to delete an old training dataset from a project for a modified training dataset - what is the best way (deleting the annif/data/projects<project folder> safe?)?

Regards

--
You received this message because you are subscribed to the Google Groups "Annif Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to annif-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/annif-users/4b986f3a-cfe2-4fb4-9252-8bd7cb0e60can%40googlegroups.com.

juho.i...@helsinki.fi

unread,
Apr 28, 2022, 4:59:23 AMApr 28
to Annif Users
Yes, you can delete the data/projects/<PROJECT_ID> folder, which contains all the files that are created when the project was trained. Or you can use "annif clear PROJECT_ID", which does this deleting for you. :)
-Juho
Reply all
Reply to author
Forward
0 new messages