简体   繁体   中英

I have already installed Pyaudio but still visual studio code is showing please check installation of PyAudio

I have already installed the PyAudio module but Visual Studio Code is showing an error:

please check installation of PyAudio

What can I do?

Please check and see if you pip installed PyAudio to the same version of python vscode is using. It would probably be better to install a virtual environment in your project folder and use that to avoid confusion. Open a terminal in vscode. Then Python3 -m venv venv

source venv/bin/activate

pip install PyAudio

Although this step is a little different if using Windows.

The prompt means it can't find the package in the environment you are using. After you select the environment, remember to activate the terminal(Ctrl+Shift+`) before install the package. Otherwise, you would install the package in the wrong environment(wrong place), although you installed the package you still can't find it.

It is recommended to create a virtual environment as Charles Wilson said. you can refer to python environment official docs for more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM