Error in loading in jupyter lab

wav=tfio.audio.resample(wav,rate_in=sample_rate,rate_out=16000)

NotImplementedError Traceback (most recent call last)
Cell In[61], line 1
----> 1 wav=tfio.audio.resample(wav,rate_in=sample_rate,rate_out=16000)

File D:\Atharv\New\Lib\site-packages\tensorflow_io\python\ops\audio_ops.py:462, in resample(input, rate_in, rate_out, name)
457 def f(i):
458 return core_ops.io_audio_resample(
459 i, rate_in=rate_in, rate_out=rate_out, name=name
460 )
β†’ 462 value = tf.vectorized_map(f, input)
464 def g1():
465 return tf.squeeze(value, [0, -1])

File D:\Atharv\New\Lib\site-packages\tensorflow\python\ops\parallel_for\control_flow_ops.py:577, in vectorized_map(fn, elems, fallback_to_while_loop, warn)
574 else:
575 batch_size = max(static_first_dims)
β†’ 577 return pfor(
578 loop_fn,
579 batch_size,
580 fallback_to_while_loop=fallback_to_while_loop,
581 warn=warn)

File D:\Atharv\New\Lib\site-packages\tensorflow\python\ops\parallel_for\control_flow_ops.py:227, in pfor(loop_fn, iters, fallback_to_while_loop, parallel_iterations, warn)
224 def_function.run_functions_eagerly(False)
225 f = def_function.function(f)
β†’ 227 outputs = f()
228 if functions_run_eagerly is not None:
229 def_function.run_functions_eagerly(functions_run_eagerly)

File D:\Atharv\New\Lib\site-packages\tensorflow\python\util\traceback_utils.py:153, in filter_traceback..error_handler(*args, **kwargs)
151 except Exception as e:
152 filtered_tb = _process_traceback_frames(e.traceback)
β†’ 153 raise e.with_traceback(filtered_tb) from None
154 finally:
155 del filtered_tb

File ~\AppData\Local\Temp_autograph_generated_filegwwmwv6n.py:17, in outer_factory..inner_factory..tf__f()
15 try:
16 do_return = True
β€”> 17 retval
= ag__.converted_call(ag__.ld(pfor_impl), (ag_.ld(loop_fn), ag__.ld(iters)), dict(fallback_to_while_loop=ag__.ld(fallback_to_while_loop), parallel_iterations=ag__.ld(parallel_iterations), warn=ag__.ld(warn)), fscope)
18 except:
19 do_return = False

File D:\Atharv\New\Lib\site-packages\tensorflow_io\python\ops\audio_ops.py:458, in resample..f(i)
457 def f(i):
β†’ 458 return core_ops.io_audio_resample(
459 i, rate_in=rate_in, rate_out=rate_out, name=name
460 )

File D:\Atharv\New\Lib\site-packages\tensorflow_io\python\ops_init_.py:88, in LazyLoader.getattr(self, attrb)
87 def getattr(self, attrb):
β€”> 88 return getattr(self._load(), attrb)

File D:\Atharv\New\Lib\site-packages\tensorflow_io\python\ops_init_.py:84, in LazyLoader._load(self)
82 def _load(self):
83 if self._mod is None:
β€”> 84 self._mod = _load_library(self._library)
85 return self._mod

File D:\Atharv\New\Lib\site-packages\tensorflow_io\python\ops_init_.py:69, in _load_library(filename, lib)
67 except (tf.errors.NotFoundError, OSError) as e:
68 errs.append(str(e))
β€”> 69 raise NotImplementedError(
70 β€œunable to open file: "
71 + f”{filename}, from paths: {filenames}\ncaused by: {errs}"
72 )

NotImplementedError: in user code:

File "D:\Atharv\New\Lib\site-packages\tensorflow_io\python\ops\audio_ops.py", line 458, in f
    return core_ops.io_audio_resample(
File "D:\Atharv\New\Lib\site-packages\tensorflow_io\python\ops\__init__.py", line 88, in __getattr__
    return getattr(self._load(), attrb)
File "D:\Atharv\New\Lib\site-packages\tensorflow_io\python\ops\__init__.py", line 84, in _load
    self._mod = _load_library(self._library)
File "D:\Atharv\New\Lib\site-packages\tensorflow_io\python\ops\__init__.py", line 69, in _load_library
    raise NotImplementedError(

NotImplementedError: unable to open file: libtensorflow_io.so, from paths: ['D:\\Atharv\\New\\Lib\\site-packages\\tensorflow_io\\python\\ops\\libtensorflow_io.so']
caused by: ['D:\\Atharv\\New\\Lib\\site-packages\\tensorflow_io\\python\\ops\\libtensorflow_io.so not found']

Jupyter notebook is showing this error please anyone help to resolve it

Hi @Atharv
Welcome to Tensorflow Forum !

To fix the error, you can try uninstalling TensorFlow and TensorFlow IO from pip and then reinstalling them. To do this, run the following commands:

pip uninstall tensorflow
pip uninstall tensorflow-io
pip install tensorflow-gpu
pip install --no-deps tensorflow-io

Let us know if this fix the problem.

1 Like

Maybe before un-installing / re-installing different packages, you want to make sure the version of TensorFlow I/O you picked is compatible with your version installed of Tensorflow. One can find the list of TensorFlow I/O - Tensorflow compatibilities here