0

So I'm trying to install whisper from OpenAI and says I have version 3.11.2 so it can not install whisper which requires only versions >=3.7,<3.11 But I swear when I check my python version it says I have the one I need, like this:

$ python --version                                      
Python 3.10.8

Btw Before I had version 3.11.2 but I changed it with help from this post
Maybe doing the commands from this post didn't help. I'm a total begginner so maybe there is a simple solution which I don't kow. Also I'm using kali linux.
Down here is the error I have:

pip install git+https://github.com/openai/whisper.git 
    Defaulting to user installation because normal site-packages is not writeable
    Collecting git+https://github.com/openai/whisper.git
      Cloning https://github.com/openai/whisper.git to /tmp/pip-req-build-n6ajw2le
      Running command git clone --filter=blob:none --quiet https://github.com/openai/whisper.git /tmp/pip-req-build-n6ajw2le
      Resolved https://github.com/openai/whisper.git to commit ad3250a846fe7553a25064a2dc593e492dadf040
      Installing build dependencies ... done
      Getting requirements to build wheel ... done
      Preparing metadata (pyproject.toml) ... done
    Collecting triton==2.0.0
      Using cached triton-2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (63.3 MB)
    Collecting numba
      Using cached numba-0.56.4.tar.gz (2.4 MB)
      Preparing metadata (setup.py) ... 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 "/tmp/pip-install-bvqf8ryy/numba_26a7eac980d84443948e159a452af5d2/setup.py", line 51, in <module>
              _guard_py_ver()
            File "/tmp/pip-install-bvqf8ryy/numba_26a7eac980d84443948e159a452af5d2/setup.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.2; 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.
11
  • I posted the code in this terribly. I will edit it if I can. Although the problem is what I wrote at the start. First time in this forum, sorry. Mar 9 at 0:43
  • If you run ` python3 --version` what do you get? Also (maybe this is not problem as the error says) but you can try running: pip3 install instead of pip install. Mar 9 at 1:01
  • When I run ` python3 --version` it says: └─$ python3 --version Python 3.11.2 Also, I tried pip3 install git+github.com/openai/whisper.git And I got the same error Mar 9 at 1:14
  • ` python3 --version ` says I have version 3.11.2 and └─$ pip3 install git+github.com/openai/whisper.git gives me the same error. Mar 9 at 1:28
  • Sorry, my bad, the command should be sudo ln -sf /usr/bin/python3.10 /usr/bin/python3 (backup /usr/bin/python3 in case this one is not a symlink, make the backup by using cp /usr/bin/python3 /home/youruser/) Mar 9 at 1:41

1 Answer 1

1

The problem with update-alternatives is the other versions are still installed and the programs you're using don't necessarily have to use the version you want them to. Try removing unwanted packages with apt purge.

Also, look in ~/.local/bin and ~/.local/lib to remove Python-related junk that pip leaves behind. If you didn't install anything else in those folders, they should be safe to delete. Warning: ~/.local/share does contain files you will want to keep. If you want to clean it up, you'll have to go through it manually.

pip caches downloads in ~/.cache/pip, so you can reinstall packages without having to redownload most of them.

1
  • 1
    Thanks for you answer! The forum user ' Edgar Magallon' helped me in the comments, but your answer was very educational. Thank you again! Sadly I can't upvote until I have 15 reputation, I wanted to upvote you. Mar 9 at 2:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .