wting / autojump

A cd command that learns - easily navigate directories from the command line
Other
16.06k stars 702 forks source link

Autojump is throwing Python errors #691

Closed Setu-Gupta closed 2 months ago

Setu-Gupta commented 2 months ago

I'm on an ArchLinux machine and since the last update (2 days ago), autojump has started throwing python errors. I'm using autojump with zsh.

$ j Downloads
Traceback (most recent call last):
  File "/usr/bin/autojump", line 39, in <module>
    from autojump_argparse import ArgumentParser
ModuleNotFoundError: No module named 'autojump_argparse'
autojump: directory 'Downloads' not found

Try `autojump --help` for more information.

Even if I navigate via cd, I still get the error.

$ cd ~
Traceback (most recent call last):                                                                                                                             
  File "/usr/bin/autojump", line 39, in <module>
    from autojump_argparse import ArgumentParser
ModuleNotFoundError: No module named 'autojump_argparse'

The python version on my machine is 3.12.3. How do I fix this?

Setu-Gupta commented 2 months ago

I found the problem. Arch recently migrated from Python 3.11 to Python 3.12. This means that now the libraries live in /usr/lib/python3.12/site-packages instead of /usr/lib/python3.11/site-packages. So the solution is to just reinstall the python packages which depend on Python 3.11.

Setu-Gupta commented 2 months ago

Fixed after reinstalling autojump