Unable to install top2vec

Question:

I’m trying to install top2vec for my topic analysis project. To install, I’ve used this command pip install top2vec. The installation process starts normally but it ends with this error:

  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error

  python setup.py egg_info did not run successfully.
  exit code: 1

  [8 lines of output]
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:UsersAsusAppDataLocalTemppip-install-grwckgy_numba_5149fd90a1d24717819bfa776cf85678setup.py", line 51, in <module>
      _guard_py_ver()
    File "C:UsersAsusAppDataLocalTemppip-install-grwckgy_numba_5149fd90a1d24717819bfa776cf85678setup.py", line 48, in _guard_py_ver
      raise RuntimeError(msg.format(cur_py, min_py, max_py))
  RuntimeError: Cannot install on Python version 3.11.1; only versions >=3.7,<3.11 are supported.
  [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Encountered error while generating package metadata.

See above for output.

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

My pip version is: pip 22.3.1

Asked By: Araf

||

Answers:

The error your paste tell you everything:

File "C:UsersAsusAppDataLocalTemppip-install-grwckgy_numba_5149fd90a1d24717819bfa776cf85678setup.py", line 48, in _guard_py_ver
      raise RuntimeError(msg.format(cur_py, min_py, max_py))
  RuntimeError: Cannot install on Python version 3.11.1; only versions >=3.7,<3.11 are supported.

The root cause is when top2vec try to install its dependency numba, it said it can only support version >=3.7, <3.11, while your python version is 3.11.1.

See this and this:

We have not released numba and llvmlite for python3.11. The new python version is requiring massive changes to numba because of how numba is tightly coupled to Python’s bytecode internals.

The Python 3.11 support for the Numba project, for example, is still a work-in-progress as of Dec 8, 2022. Apparently it took them 6 months post-release until they had Python 3.9 support, and 3 months after 3.10.

So, you can monitor this official issue to see their update, or downgrade your python version.

Answered By: atline
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.