我在anaconda环境中使用tensorflow 1.8.0,在尝试运行python文件时,它向我显示以下错误:
(tensorflow) C:\Users\Jose\Anaconda3>python.exe clasifica.py
C:\Users\Jose\Anaconda3\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "clasifica.py", line 4, in <module>
import tflearn
File "C:\Users\Jose\Anaconda3\lib\site-packages\tflearn\__init__.py", line 4, in <module>
from . import config
File "C:\Users\Jose\Anaconda3\lib\site-packages\tflearn\config.py", line 5, in <module>
from .variables import variable
File "C:\Users\Jose\Anaconda3\lib\site-packages\tflearn\variables.py", line 7, in <module>
from tensorflow.contrib.framework.python.ops import add_arg_scope as contrib_add_arg_scope
File "C:\Users\Jose\Anaconda3\lib\site-packages\tensorflow\contrib\__init__.py", line 34, in <module>
from tensorflow.contrib import data
File "C:\Users\Jose\Anaconda3\lib\site-packages\tensorflow\contrib\data\__init__.py", line 67, in <module>
from tensorflow.contrib.data.python.ops.error_ops import ignore_errors
File "C:\Users\Jose\Anaconda3\lib\site-packages\tensorflow\contrib\data\python\ops\error_ops.py", line 20, in <module>
from tensorflow.contrib.data.python.ops import contrib_op_loader # pylint: disable=unused-import
File "C:\Users\Jose\Anaconda3\lib\site-packages\tensorflow\contrib\data\python\ops\contrib_op_loader.py", line 24, in <module>
resource_loader.get_path_to_datafile("../../_dataset_ops.so"))
File "C:\Users\Jose\Anaconda3\lib\site-packages\tensorflow\contrib\util\loader.py", line 56, in load_op_library
ret = load_library.load_op_library(path)
File "C:\Users\Jose\Anaconda3\lib\site-packages\tensorflow\python\framework\load_library.py", line 56, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: C:\Users\Jose\Anaconda3\lib\site-packages\tensorflow\contrib\data\python\ops\..\..\_dataset_ops.so not found
我正在使用:
Tensorflow版本:1.8.0,
Anaconda中的Python 3.6.4,
Windows 10 Pro
答案 0 :(得分:1)
我也遇到了同样的错误。如果您在gpu上运行tensorflow,则选择以下方法,请按照以下路径查找_dataset_ops.so
D:\ programfiles \ Anaconda3 \ envs \ tensorflow \ Lib \ site-packages \ tensorflow \ contrib \ data
然后将_dataset_ops.so文件从该文件夹移至另一个位置。
答案 1 :(得分:0)
solution by Awasthi可以正常工作。您可能还需要对这4个OS文件执行相同的操作。
1)NotFoundError:C:\ Users \ USER \ Anaconda3 \ lib \ site-packages \ tensorflow \ contrib \ coder \ python \ ops_coder_ops.so未找到 2)NotFoundError:C:\ Users \ USER \ Anaconda3 \ lib \ site-packages \ tensorflow \ contrib \ rnn \ python \ ops_gru_ops.so未找到 3)NotFoundError:C:\ Users \ USER \ Anaconda3 \ lib \ site-packages \ tensorflow \ contrib \ rnn \ python \ ops_lstm_ops.so未找到 4)NotFoundError:C:\ Users \ USER \ Anaconda3 \ lib \ site-packages \ tensorflow \ contrib \ nccl \ python \ ops_nccl_ops.so未找到