简体   繁体   中英

unable to import the module that i have just installed in VS code(i am using Ubuntu)

I have installed package playsound and this is my command and its response:

pip install playsound

Defaulting to user installation because normal site-packages is not writeable Collecting playsound Downloading playsound-1.2.2-py2.py3-none-any.whl (6.0 kB) Installing collected packages: playsound Successfully installed playsound-1.2.2

But when I want to use this package I see error like this:

python ./musicplay.py Traceback (most recent call last): File "./musicplay.py", line 1, in from playsound import playsound ImportError: No module named playsound

Pls. check pip list to check if the package is installed properly. Also, run which python to make sure that the virtual env where you have installed and where you are executing code is the same.

Also, try running your imports in the python terminal

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