1.運行python程序時發現缺少numpy庫
運行-》cmd輸入 pip3 install numpy,下載中
看到Successfully installed numpy-1.18.4顯然安裝成功了
輸入python進入python解釋器並輸入import numpy as np驗證一下,沒報錯,確定安裝成功了。
2.發現這個叫matplotlib的庫也缺少
什么是pip,如果沒有怎么安裝?https://www.runoob.com/w3cnote/python-pip-install-usage.html
輸入命令pip --version檢查了一下,我這個確實自帶有了。
直接像1中一樣pip3 install matplotlib
成功了,也可以驗證一下,這里提醒我更新pip版本了,於是更新一下。
提示我老版本已經下線,新版本上線。
3.試一下經驗貼里粒子群算法運行情況https://blog.csdn.net/xyisv/article/details/79058574
可以成功運行。