Unable to open file: libtensorflow_io.so

I’m currently using a jupyter notebook for an Alexa type model. I cannot run one of these cells because I don’t have libtensorflow_io.so found. I have downloaded all the requirements, I just keep getting this error. I can’t seem to find a fix anywhere.

I’ve ran two different instances in python 3.11 and 3.9 and reinstalled the tensorflow libraries multiple times. It seems that the only “issue” I have is with:

from tensorflow.io import gfile

In both environments, this line is given a problem warning by vs code and I’ve done everything I know how to do to try and solve this.

Here is the repo I’m following: GitHub - atomic14/diy-alexa: DIY Alexa

{
“name”: “NotImplementedError”,
“message”: “unable to open file: libtensorflow_io.so, from paths: [‘c:\\Users\\volac\\Desktop\\Guardbot\\venv\\Lib\\site-packages\\tensorflow_io\\python\\ops\\libtensorflow_io.so’]\ncaused by: [‘c:\\Users\\volac\\Desktop\\Guardbot\\venv\\Lib\\site-packages\\tensorflow_io\\python\\ops\\libtensorflow_io.so not found’]”,
“stack”: “\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mNotImplementedError\u001b[0m Traceback (most recent call last)\nCell \u001b[1;32mIn[9], line 47\u001b[0m\n\u001b[0;32m 44\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39m’\u001b[39m\u001b[39m_\u001b[39m\u001b[39m’\u001b[39m \u001b[39mnot\u001b[39;00m \u001b[39min\u001b[39;00m word:\n\u001b[0;32m 45\u001b[0m \u001b[39m# add more examples of marvin to balance our training set\u001b[39;00m\n\u001b[0;32m 46\u001b[0m repeat \u001b[39m=\u001b[39m \u001b[39m70\u001b[39m \u001b[39mif\u001b[39;00m word \u001b[39m==\u001b[39m \u001b[39m’\u001b[39m\u001b[39mmarvin\u001b[39m\u001b[39m’\u001b[39m \u001b[39melse\u001b[39;00m \u001b[39m1\u001b[39m\n\u001b[1;32m—> 47\u001b[0m process_word(word, repeat\u001b[39m=\u001b[39;49mrepeat)\n\u001b[0;32m 49\u001b[0m \u001b[39mprint\u001b[39m(\u001b[39mlen\u001b[39m(train), \u001b[39mlen\u001b[39m(test), \u001b[39mlen\u001b[39m(validate))\n\nCell \u001b[1;32mIn[9], line 10\u001b[0m, in \u001b[0;36mprocess_word\u001b[1;34m(word, repeat)\u001b[0m\n\u001b[0;32m 8\u001b[0m label \u001b[39m=\u001b[39m words\u001b[39m.\u001b[39mindex(word)\n\u001b[0;32m 9\u001b[0m \u001b[39m# get a list of files names for the word\u001b[39;00m\n\u001b[1;32m—> 10\u001b[0m file_names \u001b[39m=\u001b[39m [file_name \u001b[39mfor\u001b[39;49;00m file_name \u001b[39min\u001b[39;49;00m tqdm(get_files(word), desc\u001b[39m=\u001b[39;49m\u001b[39m"\u001b[39;49m\u001b[39mChecking\u001b[39;49m\u001b[39m"\u001b[39;49m, leave\u001b[39m=\u001b[39;49m\u001b[39mFalse\u001b[39;49;00m) \u001b[39mif\u001b[39;49;00m is_valid_file(file_name)]\n\u001b[0;32m 11\u001b[0m \u001b[39m# randomly shuffle the filenames\u001b[39;00m\n\u001b[0;32m 12\u001b[0m np\u001b[39m.\u001b[39mrandom\u001b[39m.\u001b[39mshuffle(file_names)\n\nCell \u001b[1;32mIn[9], line 10\u001b[0m, in \u001b[0;36m\u001b[1;34m(.0)\u001b[0m\n\u001b[0;32m 8\u001b[0m label \u001b[39m=\u001b[39m words\u001b[39m.\u001b[39mindex(word)\n\u001b[0;32m 9\u001b[0m \u001b[39m# get a list of files names for the word\u001b[39;00m\n\u001b[1;32m—> 10\u001b[0m file_names \u001b[39m=\u001b[39m [file_name \u001b[39mfor\u001b[39;00m file_name \u001b[39min\u001b[39;00m tqdm(get_files(word), desc\u001b[39m=\u001b[39m\u001b[39m"\u001b[39m\u001b[39mChecking\u001b[39m\u001b[39m"\u001b[39m, leave\u001b[39m=\u001b[39m\u001b[39mFalse\u001b[39;00m) \u001b[39mif\u001b[39;00m is_valid_file(file_name)]\n\u001b[0;32m 11\u001b[0m \u001b[39m# randomly shuffle the filenames\u001b[39;00m\n\u001b[0;32m 12\u001b[0m np\u001b[39m.\u001b[39mrandom\u001b[39m.\u001b[39mshuffle(file_names)\n\nCell \u001b[1;32mIn[5], line 28\u001b[0m, in \u001b[0;36mis_valid_file\u001b[1;34m(file_name)\u001b[0m\n\u001b[0;32m 26\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mis_valid_file\u001b[39m(file_name):\n\u001b[0;32m 27\u001b[0m \u001b[39m# load the audio file\u001b[39;00m\n\u001b[1;32m—> 28\u001b[0m audio_tensor \u001b[39m=\u001b[39m tfio\u001b[39m.\u001b[39;49maudio\u001b[39m.\u001b[39;49mAudioIOTensor(file_name)\n\u001b[0;32m 29\u001b[0m \u001b[39m# check the file is long enough\u001b[39;00m\n\u001b[0;32m 30\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mnot\u001b[39;00m is_correct_length(audio_tensor, EXPECTED_SAMPLES):\n\nFile \u001b[1;32mc:\Users\volac\Desktop\Guardbot\venv\Lib\site-packages\tensorflow_io\python\ops\audio_ops.py:664\u001b[0m, in \u001b[0;36mAudioIOTensor.init\u001b[1;34m(self, filename, dtype)\u001b[0m\n\u001b[0;32m 662\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mnot\u001b[39;00m tf\u001b[39m.\u001b[39mexecuting_eagerly():\n\u001b[0;32m 663\u001b[0m \u001b[39massert\u001b[39;00m dtype \u001b[39mis\u001b[39;00m \u001b[39mnot\u001b[39;00m \u001b[39mNone\u001b[39;00m, \u001b[39m"\u001b[39m\u001b[39mdtype must be provided in graph mode\u001b[39m\u001b[39m"\u001b[39m\n\u001b[1;32m–> 664\u001b[0m resource \u001b[39m=\u001b[39m core_ops\u001b[39m.\u001b[39;49mio_audio_readable_init(filename)\n\u001b[0;32m 665\u001b[0m \u001b[39mif\u001b[39;00m tf\u001b[39m.\u001b[39mexecuting_eagerly():\n\u001b[0;32m 666\u001b[0m shape, dtype, rate \u001b[39m=\u001b[39m core_ops\u001b[39m.\u001b[39mio_audio_readable_spec(resource)\n\nFile \u001b[1;32mc:\Users\volac\Desktop\Guardbot\venv\Lib\site-packages\tensorflow_io\python\ops\init.py:88\u001b[0m, in \u001b[0;36mLazyLoader.getattr\u001b[1;34m(self, attrb)\u001b[0m\n\u001b[0;32m 87\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39m__getattr__\u001b[39m(\u001b[39mself\u001b[39m, attrb):\n\u001b[1;32m—> 88\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mgetattr\u001b[39m(\u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_load(), attrb)\n\nFile \u001b[1;32mc:\Users\volac\Desktop\Guardbot\venv\Lib\site-packages\tensorflow_io\python\ops\init.py:84\u001b[0m, in \u001b[0;36mLazyLoader._load\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 82\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39m_load\u001b[39m(\u001b[39mself\u001b[39m):\n\u001b[0;32m 83\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_mod \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m:\n\u001b[1;32m—> 84\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_mod \u001b[39m=\u001b[39m _load_library(\u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_library)\n\u001b[0;32m 85\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_mod\n\nFile \u001b[1;32mc:\Users\volac\Desktop\Guardbot\venv\Lib\site-packages\tensorflow_io\python\ops\init.py:69\u001b[0m, in \u001b[0;36m_load_library\u001b[1;34m(filename, lib)\u001b[0m\n\u001b[0;32m 67\u001b[0m \u001b[39mexcept\u001b[39;00m (tf\u001b[39m.\u001b[39merrors\u001b[39m.\u001b[39mNotFoundError, \u001b[39mOSError\u001b[39;00m) \u001b[39mas\u001b[39;00m e:\n\u001b[0;32m 68\u001b[0m errs\u001b[39m.\u001b[39mappend(\u001b[39mstr\u001b[39m(e))\n\u001b[1;32m—> 69\u001b[0m \u001b[39mraise\u001b[39;00m \u001b[39mNotImplementedError\u001b[39;00m(\n\u001b[0;32m 70\u001b[0m \u001b[39m"\u001b[39m\u001b[39munable to open file: \u001b[39m\u001b[39m"\u001b[39m\n\u001b[0;32m 71\u001b[0m \u001b[39m+\u001b[39m \u001b[39mf\u001b[39m\u001b[39m"\u001b[39m\u001b[39m{\u001b[39;00mfilename\u001b[39m}\u001b[39;00m\u001b[39m, from paths: \u001b[39m\u001b[39m{\u001b[39;00mfilenames\u001b[39m}\u001b[39;00m\u001b[39m\n\u001b[39;00m\u001b[39mcaused by: \u001b[39m\u001b[39m{\u001b[39;00merrs\u001b[39m}\u001b[39;00m\u001b[39m"\u001b[39m\n\u001b[0;32m 72\u001b[0m )\n\n\u001b[1;31mNotImplementedError\u001b[0m: unable to open file: libtensorflow_io.so, from paths: [‘c:\\Users\\volac\\Desktop\\Guardbot\\venv\\Lib\\site-packages\\tensorflow_io\\python\\ops\\libtensorflow_io.so’]\ncaused by: [‘c:\\Users\\volac\\Desktop\\Guardbot\\venv\\Lib\\site-packages\\tensorflow_io\\python\\ops\\libtensorflow_io.so not found’]”
}