Error reporting of import basemap in pychar

The direct cause is that the system cannot find this proj_Lib environment variable, so an error is reported

Root cause: when calling the basemap module, the proj4 module that the basemap depends on will be called. Therefore, when installing the basemap module on anaconda, you can see that the proj4 module is also installed. But the most pitiful thing is that when installing proj4 under Anaconda root, you will not actively set the environment variables of proj4 module, which leads to such errors

Solution: first find the installation path of proj4 in Anaconda installation directory. Mine is in D: \ software \ Anaconda \ Pkgs \ proj4-4.9.3-hfa6e2cd_8. Then open this folder and enter library – > Share folder, select and copy all the files inside, and paste them into the folder D: \ software \ Anaconda \ share \ proj (if there is no proj folder in the root directory of anaconda, create one)

Then, set the environment variable, that is, create a new one under the user variable

Similar Posts: