How do i import pyaudio to ROS Node?

asked 2021-10-21 07:00:37 -0600

FilipROSdev gravatar image

Hi i wrote ros node in python which import pyaudio. In pycharm (using virtualenv) i can run my node however when i use rosrun my_pkg my_node 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.

edit retag flag offensive close merge delete

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?

osilva gravatar image osilva  ( 2021-10-21 08:24:30 -0600 )edit