pulseaudio-equalizer-ladspa / equalizer

Pulseaudio LADSPA Equalizer
GNU General Public License v3.0
138 stars 15 forks source link

ImportError: No module named pulseeq #18

Closed logix2 closed 5 years ago

logix2 commented 5 years ago

I'm trying to run this on an Ubuntu 18.04 computer but I'm getting this error:

$ pulseaudio-equalizer-gtk 
Traceback (most recent call last):
  File "/usr/bin/pulseaudio-equalizer-gtk", line 10, in <module>
    from pulseeq import equalizer
ImportError: No module named pulseeq

All files seem to be installed:

$ sudo ninja install
[0/1] Installing files.
Installing subdir /home/logix/Downloads/equalizer-3.0.0/data/presets to /usr/share/pulseaudio-equalizer-ladspa/presets
Installing data/com.github.pulseaudio-equalizer-ladspa.Equalizer.gresource to /usr/share/pulseaudio-equalizer-ladspa/com.github.pulseaudio-equalizer-ladspa.Equalizer.gresource
Installing /home/logix/Downloads/equalizer-3.0.0/build/bin/pulseaudio-equalizer-gtk to /usr/bin
Installing /home/logix/Downloads/equalizer-3.0.0/build/bin/pulseaudio-equalizer to /usr/bin
Installing /home/logix/Downloads/equalizer-3.0.0/data/com.github.pulseaudio-equalizer-ladspa.Equalizer.desktop to /usr/share/applications
Installing /home/logix/Downloads/equalizer-3.0.0/pulseeq/equalizer.py to /usr/lib/python3.6/site-packages/pulseeq

Any ideas?

FFY00 commented 5 years ago

Can you run env python --version?

rautesamtr commented 5 years ago

If i remember correctly pymod.find_installation() uses the python version meson uses that looks like python 3.6 in this case while /usr/bin/env python in pulseaudio-equalizer-gtk will most likely point to python 2 in ubuntu 18.04. We need to set it to the python version used for the installation. Sorry my mistake. https://github.com/pulseaudio-equalizer-ladspa/equalizer/blob/20fb09cc3288995206f87d427e4b3f08dc34710c/meson.build#L7

rautesamtr commented 5 years ago

@logix2 Note #19 will fix the python version but python3-gi 3.30 is needed for template support which will only available for ubuntu >= 18.10.

logix2 commented 5 years ago

Thanks. I guess I'll have to wait for the new release (not far though :) ).

logix2 commented 5 years ago

Well I'm now using Ubuntu 18.10 with python3-gi 3.30 and I get the exact same error:

 $ pulseaudio-equalizer-gtk 
Traceback (most recent call last):
  File "/usr/bin/pulseaudio-equalizer-gtk", line 10, in <module>
    from pulseeq import equalizer
ModuleNotFoundError: No module named 'pulseeq'

What could be wrong?

rautesamtr commented 5 years ago

Hi,

looks like mesons python module and its function python.install_sources ignores that ubuntu uses dist-packages in sys.path rather then site-packages. This probably comes from this bug https://bugs.launchpad.net/ubuntu/+source/python3-defaults/+bug/1408092.

For now you should be able to run the application by adding the module to the python path e.g. with /usr/local as prefix PYTHONPATH=/usr/local/lib/python3.6/site-packages pulseaudio-equalizer-gtk.

logix2 commented 5 years ago

That works, thanks!

FFY00 commented 5 years ago

You probably can make this work out of the box by setting the meson prefix to /usr.

logix2 commented 5 years ago

I actually built the package with meson --prefix=/usr (so I used PYTHONPATH=/usr/lib/python3.6/site-packages pulseaudio-equalizer-gtk).

FFY00 commented 5 years ago

We should add a option to set the python path.