在 anaconda 上使用tensorflow 2.6.0设置tensorflow_io
我是 TensorFlow 新手,我正在尝试在本地计算机上设置 ML 平台,并且需要将一些音频文件作为数据提供给我的神经网络。为此我需要 TensorFlow-io。
但是当我使用 anaconda navigator (2.1.2) 设置 TensorFlow 时,我不断遇到以下错误。
---------------------------------------------------------------------------
AlreadyExistsError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_2820\3937949001.py in <module>
1 import tensorflow as tf
----> 2 import tensorflow_io as tfio
3
4
5
E:\aconda\envs\p37env\lib\site-packages\tensorflow_io\__init__.py in <module>
15 """tensorflow_io"""
16
---> 17 from tensorflow_io.python.api import * # pylint: disable=wildcard-import
18 from tensorflow_io.python.api.version import VERSION as __version__
E:\aconda\envs\p37env\lib\site-packages\tensorflow_io\python\api\__init__.py in <module>
17
18 # tensorflow_io.core.python.ops is implicitly imported (along with file system)
---> 19 from tensorflow_io.python.ops.io_dataset import IODataset
20 from tensorflow_io.python.ops.io_tensor import IOTensor
21
E:\aconda\envs\p37env\lib\site-packages\tensorflow_io\python\ops\__init__.py in <module>
94 core_ops = LazyLoader("core_ops", "libtensorflow_io.so")
95 try:
---> 96 plugin_ops = _load_library("libtensorflow_io_plugins.so", "fs")
97 except NotImplementedError as e:
98 warnings.warn("unable to load libtensorflow_io_plugins.so: {}".format(e))
E:\aconda\envs\p37env\lib\site-packages\tensorflow_io\python\ops\__init__.py in _load_library(filename, lib)
62 for f in filenames:
63 try:
---> 64 l = load_fn(f)
65 if l is not None:
66 return l
E:\aconda\envs\p37env\lib\site-packages\tensorflow_io\python\ops\__init__.py in <lambda>(f)
54 load_fn = lambda f: ctypes.CDLL(f, mode=ctypes.RTLD_GLOBAL)
55 elif lib == "fs":
---> 56 load_fn = lambda f: tf.experimental.register_filesystem_plugin(f) is None
57 else:
58 load_fn = lambda f: tf.compat.v1.load_file_system_library(f) is None
E:\aconda\envs\p37env\lib\site-packages\tensorflow\python\framework\load_library.py in register_filesystem_plugin(plugin_location)
216 """
217 if os.path.exists(plugin_location):
--> 218 py_tf.TF_RegisterFilesystemPlugin(plugin_location)
219
220 else:
AlreadyExistsError: File system for az already registered
我的 python 版本是 3.9,我根据其文档安装 tfio v 0.20.0 (https:// pypi.org/project/tensorflow-io/)
我使用 pip 将tensorflow安装为 - > pip安装tensorflow_io==0.20.0
I'm new to TensorFlow, I m trying to set up my ML platform on my local machine and I need to feed some audio files as data to my neural network. for this I need TensorFlow-io.
but when I setup TensorFlow with anaconda navigator (2.1.2) I keep running into the following error.
---------------------------------------------------------------------------
AlreadyExistsError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_2820\3937949001.py in <module>
1 import tensorflow as tf
----> 2 import tensorflow_io as tfio
3
4
5
E:\aconda\envs\p37env\lib\site-packages\tensorflow_io\__init__.py in <module>
15 """tensorflow_io"""
16
---> 17 from tensorflow_io.python.api import * # pylint: disable=wildcard-import
18 from tensorflow_io.python.api.version import VERSION as __version__
E:\aconda\envs\p37env\lib\site-packages\tensorflow_io\python\api\__init__.py in <module>
17
18 # tensorflow_io.core.python.ops is implicitly imported (along with file system)
---> 19 from tensorflow_io.python.ops.io_dataset import IODataset
20 from tensorflow_io.python.ops.io_tensor import IOTensor
21
E:\aconda\envs\p37env\lib\site-packages\tensorflow_io\python\ops\__init__.py in <module>
94 core_ops = LazyLoader("core_ops", "libtensorflow_io.so")
95 try:
---> 96 plugin_ops = _load_library("libtensorflow_io_plugins.so", "fs")
97 except NotImplementedError as e:
98 warnings.warn("unable to load libtensorflow_io_plugins.so: {}".format(e))
E:\aconda\envs\p37env\lib\site-packages\tensorflow_io\python\ops\__init__.py in _load_library(filename, lib)
62 for f in filenames:
63 try:
---> 64 l = load_fn(f)
65 if l is not None:
66 return l
E:\aconda\envs\p37env\lib\site-packages\tensorflow_io\python\ops\__init__.py in <lambda>(f)
54 load_fn = lambda f: ctypes.CDLL(f, mode=ctypes.RTLD_GLOBAL)
55 elif lib == "fs":
---> 56 load_fn = lambda f: tf.experimental.register_filesystem_plugin(f) is None
57 else:
58 load_fn = lambda f: tf.compat.v1.load_file_system_library(f) is None
E:\aconda\envs\p37env\lib\site-packages\tensorflow\python\framework\load_library.py in register_filesystem_plugin(plugin_location)
216 """
217 if os.path.exists(plugin_location):
--> 218 py_tf.TF_RegisterFilesystemPlugin(plugin_location)
219
220 else:
AlreadyExistsError: File system for az already registered
my python version is 3.9 and I m installing tfio v 0.20.0 according to its documentation (https://pypi.org/project/tensorflow-io/)
I use pip to install tensorflow as - > pip install tensorflow_io==0.20.0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下对我有用,
使用 python 3.9.7
install tf-gpu
创建 conda env
conda install tensorflow-gpu
这将使用 gpu
install tensorflow_io 和 pip
安装tensorflow 2.6.0
pip install tensorflow_io== 0.20.0
升级tensorflow gpu到2.6.3版本
pip install张量流GPU==2.6.3
Following worked for me,
make conda env with python 3.9.7
install tf-gpu
conda install tensorflow-gpu
this will install tensorflow 2.6.0 with gpu
install tensorflow_io with pip
pip install tensorflow_io==0.20.0
upgrade tensorflow gpu to version 2.6.3
pip install tensorflow-gpu==2.6.3