1. 在虚拟环境中安装ipykernel时的报错信息:
conda install -n pyart_env ipykernel --update-deps --force-reinstall
出现:
CondaVerificationError: The package for debugpy located at D:\Anaconda\pkgs\debugpy-1.6.6-py38hd3f51b4_0
appears to be corrupted. The path 'Lib/site-packages/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.exe'
specified in the package manifest cannot be found.
CondaVerificationError: The package for pywin32 located at D:\Anaconda\pkgs\pywin32-304-py38hd3f51b4_2
appears to be corrupted. The path 'Lib/site-packages/win32/pythonservice.exe'
specified in the package manifest cannot be found.
解决方法:
step1: 删除所有package和缓存包
conda clean --packages --tarballs
然后再安装时又出现了错误InvalidArchiveError('Error with archive D:\\Anaconda\\pkgs\\lcms2-2.14-ha5c8aab_1c5up1cre\\pkg-lcms2-2.14-ha5c8aab_1.tar.zst. You probably need to delete and re-download or re-create this file,重新下载再安装也没有解决,就先没有管这个环境了。
2. import xarray时报错:
AttributeError: module 'dask.array' has no attribute 'lib'
解决方法:从2022.6.0降级到2022.3.0
pip install --upgrade xarray==2022.3.0
3. conda install pyart 时很多inconsistency的错误:
换为pip install。
装不上库的时候优先尝试这个方法。
4. 常用库的安装
- pytda:GitHub - nasa/PyTDA: Python Turbulence Detection Algorithm (PyTDA)
- 下载压缩包,而后“Run
python setup.py install
from the command line in the main PyTDA folder”
- 下载压缩包,而后“Run
- csu_radartools:GitHub - CSU-Radarmet/CSU_RadarTools: A module of independent functions to do precipitation retrievals from polarimetric radar data
- 也是解压之后在目录中执行
python setup.py install
- 也是解压之后在目录中执行
5. 'gdal_translate ' is not recognized as an internal or external command, operable program or batch file.
解决方法:找到了可执行文件的路径(D:\Anaconda\Lib\site-packages\osgeo),运行D:\Anaconda\Lib\site-packages\osgeo\gdal_translate XXX 即可。也可将其加入到环境变量当中。
6. 离线查看vscode版本号
go to Help->About
7. cartopy
anaconda安装有很多库不兼容没装得成,直接pip install cartopy。
print (cartopy.config['data_dir']) 可以查到地图文件存放路径。
然后到naturalEarth官网下载physical文件(10、50和100m比例尺的都下载下来),点击进去选择download all,然后把3个zip文件传到.../.local/share/cartopy/shapefiles/natural_earth/physical文件夹下并解压。
这样画地理边界就可以了。cartopy和wrf-python结合画图后面单独写。