之前裝的是python3 32位版本
然後重新換的64位
然後運行coverage run XXX 報錯
報錯提示 ‘coverage’ is not recognized as an internal or external command, operable program or batch file
運行pip install coverage
提示already satisfied
運行pip search coverage
發現這個包已經安裝成功,就是coverage命令運行不了
Requirement already satisfied: ‘coverage’ in “路徑A”
注意:這時候發現路徑A并不是我python的安裝路徑
解決:python -m site
…
USER_BASE: ‘C:\Users\Administrator\AppData\Roaming\Python’ (exists)
USER_SITE: ‘C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages’ (exists)
注意這兩個并不是我實際的python安裝路徑和第三方包的下載路徑
所以找到你的site.py
.\lib\site.py
找到這兩個參數然後換成你的實際python安裝路徑以及site-packages的安裝路徑就OK了