Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Missing Python Library
#1
Hi everyone:)
I'm playing around with my raspberry, precisly I'm trying to retrieve some info from the mic with python.
I found this library which appears to be perfect to do what I want to do, I installed it but when I try to launch it by typing from the command line I get the error "missing module", so I tried to verify the installation and the command line also says to me that the module is alredy there.
What should I do?

Reply
#2
enter the following on command line and post results:
python -V
which python
pip -V
pip list
Reply
#3
Here we go
Reply
#4
and the missing module name?
Reply
#5
From the output in the first post it looks like they try to use soundmeter
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#6
Yes absolutly, I'm trying to use soundmeter but every time I try to launch it it shows
"Traceback (most recent call last):
File "/usr/local/sbin/soundmeter", line 6, in <module>
from soundmeter import main
File "/usr/local/sbin/soundmeter.py", line 6, in <module>
from soundmeter.meter import main
ImportError: No module named meter"
Reply
#7
Why is your script "soundmeter" in /usr/local/sbin?

The problem is, that you call your script soundmeter.py
Rename it and the problem will disappear.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply
#8
Honestly I don't know, I just followed the istructions on GitHub at this link https://pypi.org/project/soundmeter/

It doesn't seem to work unfortunately


Quote:pi@raspberrypi:/usr/local/sbin $ ls
soundmeter soundmeter.pyc
pi@raspberrypi:/usr/local/sbin $ sudo mv soundmeter soundmeterScript
pi@raspberrypi:/usr/local/sbin $ ls
soundmeter.pyc soundmeterScript
pi@raspberrypi:/usr/local/sbin $ soundmeter
Traceback (most recent call last):
File "/usr/sbin/soundmeter", line 6, in <module>
from soundmeter.meter import main
File "/home/pi/.local/bin/soundmeter.py", line 6, in <module>
ImportError: No module named meter
pi@raspberrypi:/usr/local/sbin $ python soundmeterScript
Traceback (most recent call last):
File "soundmeterScript", line 6, in <module>
from soundmeter import main
File "/usr/local/sbin/soundmeter.py", line 6, in <module>
ImportError: No module named meter
Reply
#9
You have not followed what @DeaD_EyE suggest.
To make it clear rename/delete /usr/local/sbin/soundmeter.py in this placement.

It's shadowing the real one that's need to be called in:
/usr/lib/python2.7/dist-packages/soundmeter.py
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Missing Schema-Python Question Andwconteh 1 2,458 Jun-16-2021, 01:00 PM
Last Post: Andwconteh
  How can I compare Python XML-Files and add missing values from one to another kirat 2 2,628 Aug-30-2019, 12:17 PM
Last Post: perfringo
  PyInstaller, how to create library folder instead of library.zip file ? harun2525 2 4,745 May-06-2017, 11:29 AM
Last Post: harun2525
  Multithreading socket in Python. I'm missing something Guybrush 1 3,942 Apr-28-2017, 11:14 PM
Last Post: Ofnuts
  python is missing hsunteik 3 4,696 Dec-19-2016, 05:43 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020