我做了pip install playsoundDownloading/unpacking playsound Downloading playsound-1.2.2-py2.py3-none-any.whlInstalling collected packages: playsoundSuccessfully installed playsoundCleaning up...它安裝了 playsound(至少是這樣說(shuō)的),但是當(dāng)我輸入python3Python 3.4.2 (default, Sep 16 2019, 19:58:00) [GCC 4.9.2] on linuxType "help", "copyright", "credits" or "license" for more information.>>> import playsoundTraceback (most recent call last): File "<stdin>", line 1, in <module>ImportError: No module named 'playsound'沒(méi)有模塊?為什么會(huì)這樣?哦,我剛剛發(fā)現(xiàn)當(dāng)我使用python2時(shí)嘗試導(dǎo)入它時(shí)沒(méi)有問(wèn)題。肯定是python3和playsound有問(wèn)題吧?我如何用python3導(dǎo)入它?
1 回答

守著星空守著你
TA貢獻(xiàn)1799條經(jīng)驗(yàn) 獲得超8個(gè)贊
很可能你同時(shí)安裝了 python2 和 python3 及其包管理器,所以 pip 指的是 python2 的包管理器而不是使用
pip3 install playsound
它應(yīng)該工作正常。
添加回答
舉報(bào)
0/150
提交
取消