MarkHedleyJones / dmenu-extended

An extension to dmenu for quickly opening files and folders.
MIT License
388 stars 33 forks source link

ModuleNotFoundError: No module named 'dmenu_extended' #68

Closed hillz2 closed 6 years ago

hillz2 commented 6 years ago

I'm using manjaro and after the last update I can't run dmenu_extended_run anymore

[me@x ~]$ dmenu_extended_run
Traceback (most recent call last):
  File "/usr/bin/dmenu_extended_run", line 3, in <module>
    import dmenu_extended
ModuleNotFoundError: No module named 'dmenu_extended'

I'm using Python 3.7.0 how do I fix this ?

ffs97 commented 6 years ago

It is possible that the installation is for the incorrect python version (in your case, python2). Can you manually run the dmenu_extended_run command for python2. You can do this by running the command

python2 /usr/bin/dmenu_extended_run

If the dmenu is installed to some other path, you might want to change '/usr/bin' to whatever path you installed dmenu to. If it doesn't work for both versions, then you need to reinstall dmenu_extended with the correct python version.

hillz2 commented 6 years ago
[myname@x folder]$ python2 /usr/bin/dmenu_extended_run
Traceback (most recent call last):
  File "/usr/bin/dmenu_extended_run", line 3, in <module>
    import dmenu_extended
ImportError: No module named dmenu_extended
[myname@x folder]$ python3 /usr/bin/dmenu_extended_run
Traceback (most recent call last):
  File "/usr/bin/dmenu_extended_run", line 3, in <module>
    import dmenu_extended
ModuleNotFoundError: No module named 'dmenu_extended'
[myname@x folder]$ 
ffs97 commented 6 years ago

Can you try reinstalling dmenu_extended from source again? Run the following commands

git clone https://github.com/MarkHedleyJones/dmenu-extended.git
cd dmenu_extended
python3 setup.py --install

You will probably need to run the last command using sudo. Once this is done, try rerunning the command

python3 /usr/bin/dmenu_extended_run

P.S. You might be having problems if you are using conda.

hillz2 commented 6 years ago
[me@x dmenu-extended]$ sudo python3 setup.py --install
[sudo] password for me: 
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: option --install not recognized

Sorry for the late reply

ffs97 commented 6 years ago

Oh, my bad, it should be just python3 setup.py install

hillz2 commented 6 years ago

Thanks, now it works again