I need to use the netCDF4 module in order to do some processing. I have followed the steps on this guide and also tried used anaconda2 as recomended on this post .
netCDF4 seems to be installed, as i can run nc-config --version
and obtain:
netCDF 4.4.0-rc2
Although, when i try to import netCDF4 in python with:
from netCDF4 import Dataset
It Returns:
Traceback (most recent call last):
File "test.py", line 2, in <module>
from netCDF4 import Dataset
ImportError: No module named netCDF4
I have all dependencies installed. Cython, numpy and h5py.
It was working last night, before i turned off the PC. When i came back this morning, it just would not work. So if i have netCDF4 installed and can check it's version, how come python is not recognizing it as a module?
转换为项目解释器python 2.7,然后运行安装命令;
pip install netCDF4
I used
conda install netcdf4
and it works for python 2.7.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.