昨天安装pymoo库一个小时都没安装好,原因是pymoo要和matplotlib-3.3.4一起装,但我的matplotlib是旧版本,每次都在卸载matplotlib的时候报错ERROR: Could not install packages due to an OSError: [WinError 5] 拒绝访问,网上的各种方法也都试了,加--user啊,改文件夹权限啊,都不顶用遂放弃。
今天早上突发奇想,找到了报错源C:\Users\用户名\AppData\Roaming\Python\Python36,把里边的site-packge文件夹删掉,再安装,
pip install pymoo --user
就成功了,最后显示
Installing collected packages: matplotlib, cma, autograd, pymoo
Successfully installed autograd-1.6.2 cma-2.7.0 matplotlib-3.3.4 pymoo-0.5.0