Python 2.7.14 and Python 3.6.0 netcdf4

MRAB python at mrabarnett.plus.com
Mon Jul 23 20:27:18 EDT 2018


On 2018-07-23 23:39, jorge.conrado at cptec.inpe.br wrote:
> 
> 
>        Hi,
> 
>        Please someone can help me with this error message;
> 
> 
>        for Python 2.7.14 I did:
> 
>        from netCDF4 import Dataset
> 
>        and I didn't have no message
> 
That's because you've installed netCDF4 for Python 2.7.
> 
> 
>        But, for Python 3.6.0
> 
>        from netCDF4 import Dataset
> 
>        I had:
> 
>        Traceback (most recent call last):
>        File "<stdin>", line 1, in <module>
>        ModuleNotFoundError: No module named 'netCDF4'
> 
That's because you haven't installed netCDF4 for Python 3.6.

> 
>        What can I do to solve this error for Python 3.6.0
> 
Install that module.

Assuming that you're using Windows, try this in a console window:

py -3.6 -m pip install netCDF4



More information about the Python-list mailing list