Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error with netcdf4 package
#1
Hi, I would appreciate very much your help.

I have created my env miniconda on Linux:

conda create --name Python36-env python=3.6

conda activate Python36-env

conda install netcdf4

Then I am trying to run my script as:

python example.py

And I get the error:

File "Data_extraction.py", line 13, in <module>
nf = Dataset(mapIn,'r') #read netcdf file
File "netCDF4/_netCDF4.pyx", line 2321, in netCDF4._netCDF4.Dataset.__init__
File "netCDF4/_netCDF4.pyx", line 1885, in netCDF4._netCDF4._ensure_nc_success
FileNotFoundError: [Errno 2] No such file or directory: b'Y:/damdam/example.nc'

Lines in my script regarding netcfd4:

from netCDF4 import Dataset
mapIn='Y:/damdam/example.nc'
nf = Dataset(mapIn,'r')
ids = len(nf.variables['river_cell'][:]) etc.

so when I do: conda list, I see that I have my netcdf4 installed but when running on the server I get an error. If I run it locally I do not have any problem. That was the reason why I created virtual env on a server but the problem is still there.

Any suggestion? Thanks a lot,

Cheers

Marc
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  qpython package error Creepy 5 1,168 Apr-19-2024, 10:35 AM
Last Post: masonsbore
  countryinfo package error MarcusAurelius 4 2,848 Mar-20-2021, 05:42 PM
Last Post: deanhystad
  Importing module from a package results in import error goghvv 2 2,409 Mar-27-2020, 07:13 PM
Last Post: goghvv
  Beginner - simple package installation error mefeng2008 0 1,731 Mar-13-2020, 09:17 AM
Last Post: mefeng2008
  Error importing package julio2000 3 3,784 Jan-26-2020, 06:15 PM
Last Post: buran
  Error in importing package in pycharm fullstop 0 2,355 Dec-12-2019, 04:03 PM
Last Post: fullstop
  error using geoGen package from GITHUB hknarahari 4 3,284 Sep-17-2019, 06:59 AM
Last Post: buran
  package(s) error pykdtree zahid990170 0 2,223 Mar-21-2019, 06:18 PM
Last Post: zahid990170
  Error while importing my own package giu88 4 2,988 Sep-19-2018, 12:18 PM
Last Post: giu88
  Countryinfo package charmap error mkaru 6 7,285 Sep-16-2018, 02:58 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020