Robotics StackExchange | Archived questions

How do i import pyaudio to ROS Node?

Hi i wrote ros node in python which import pyaudio. In pycharm (using virtualenv) i can run my node however when i use rosrun mypkg mynode i'm getting AttributeError

AttributeError: 'module' object has no attribute 'PyAudio'

I don't know whether it's ROS not seeing installed modules (i installed pyaudio with pip) or maybe there is something wrong with the pyaudio modules itself.

I did catkin_make meanwhile updating code. No errors appeared.

Asked by FilipROSdev on 2021-10-21 07:00:37 UTC

Comments

Since you are using ROS Melodic, you might be using Python 2 or Python 3, not clear from your question. Can you check if pyaudio is in the proper site-packages?

Asked by osilva on 2021-10-21 08:24:30 UTC

Answers