因为要处理遥感影像所以安装了GDAL库,安装完成以后Pycharm执行python程序便报numpy导入的错误。
报的错误日志如下:
ImportError: Something is wrong with the numpy installation. While importing we detected an older version of numpy in ['D:\\anaconda\\envs\\py3\\lib\\site-packages\\numpy']. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.
参考日志,是因为环境里面有多个不同的版本numpy冲突,解决步骤如下:
1)打开,Anaconda的Anaconda Prompt 进入命令行
2)激活python工程所在环境,如果单独你的python程序建立环境的情况下。
activate py3
3)反复卸载环境里面已经安装的numpy,环境里面可能有很多个历史版本。
pip uninstall numpy
4)从新安装numpy,解决问题
pip install numpy