前提・実現したいこと
TensorFlowを利用した機械学習を実装しようとしています
import tensorflow の部分で不具合が生じました。
その後、TensorFlowの再インストール、PCの再起動を行いましたが、改善されませんでした。
ご教授よろしくお願いします。
発生している問題・エラーメッセージ
AttributeError Traceback (most recent call last)
<ipython-input-1-f4104f884cc3> in <module>
----> 1 import tensorflow as tf
2 import pandas as pd
3 import random
4 import matplotlib as mpl
5 import matplotlib.pyplot as plt
~\Anaconda3\lib\site-packages\tensorflow_init_.py in <module>
22
23 # pylint: disable=g-bad-import-order
---> 24 from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
25
26 try:
~\Anaconda3\lib\site-packages\tensorflow\python_init_.py in <module>
47 import numpy as np
48
---> 49 from tensorflow.python import pywrap_tensorflow
50
51 # Protocol buffers
~\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in <module>
56 sys.setdlopenflags(_default_dlopen_flags | ctypes.RTLD_LOCAL)
57
---> 58 from tensorflow.python.pywrap_tensorflow_internal import *
59 from tensorflow.python.pywrap_tensorflow_internal import version
60 from tensorflow.python.pywrap_tensorflow_internal import git_version
~\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in <module>
100 TFE_ContextOptionsSetConfig = _pywrap_tensorflow_internal.TFE_ContextOptionsSetConfig
101
--> 102 _pywrap_tensorflow_internal.TFE_DEVICE_PLACEMENT_EXPLICIT_swigconstant(_pywrap_tensorflow_internal)
103 TFE_DEVICE_PLACEMENT_EXPLICIT = _pywrap_tensorflow_internal.TFE_DEVICE_PLACEMENT_EXPLICIT
104
AttributeError: module '_pywrap_tensorflow_internal' has no attribute 'TFE_DEVICE_PLACEMENT_EXPLICIT_swigconstant'
該当のソースコード
Python3.6.7
ソースコード
import tensorflow as tf
import pandas as pd
import random
import matplotlib as mpl
import matplotlib.pyplot as plt
import csv
試したこと
tensroflowの再インストール
PCの再起動
補足情報(FW/ツールのバージョンなど)
Python3.6.7
TensorFlow1.12.0
Windows7
回答1件
あなたの回答
tips
プレビュー