Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1264

Python • No Module Named Pydub in Bash

$
0
0
I have a program that uses the pydub library. I want it to run at boot time. I wrote a bash script to run at boot with a line in crontab. I have temporarily commented out the line in crontab to test the script. If I run the program in Thonny, it works fine. If I run the script, it gives an import error "No module named pydub" on the line "from pydub import AudioSegment". The Script is:

Code:

#! /bin/bashsudo mkdir -p /mnt/ramdisksudo chown -R pi:pi /mnt/ramdisksudo mount -o size=2G -t tmpfs tmpfs /mnt/ramdiskcp /home/pi/PythonPrograms/Cougar.wav /mnt/ramdisk/Cougar.wavsudo amixer cset numid=1 99%cd PythonProgramspython CougarDetection.py

Statistics: Posted by wjburl — Wed Jan 10, 2024 7:33 pm



Viewing all articles
Browse latest Browse all 1264

Trending Articles