Я использую ноутбук jupyter для импорта тензорного потока 1.12.0. Моя python версия 3.7.3. Ошибка появляется в строке: импортировать тензор потока как tf
ОШИБКА: root: внутренняя ошибка Python в модуле проверки. Ниже приведена трассировка от этой внутренней ошибки.
Traceback (most recent call last):
File "C:\Users\compaq-pc\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3296, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-4-4ae80da9abf6>", line 2, in <module>
tf.__version__
AttributeError: module 'tensorflow' has no attribute '__version__'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\compaq-pc\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2033, in showtraceback
stb = value._render_traceback_()
AttributeError: 'AttributeError' object has no attribute '_render_traceback_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\compaq-pc\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 1095, in get_records
return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
File "C:\Users\compaq-pc\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 313, in wrapped
return f(*args, **kwargs)
File "C:\Users\compaq-pc\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 347, in _fixed_getinnerframes
records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
File "C:\Users\compaq-pc\Anaconda3\lib\inspect.py", line 1502, in getinnerframes
frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
File "C:\Users\compaq-pc\Anaconda3\lib\inspect.py", line 1460, in getframeinfo
filename = getsourcefile(frame) or getfile(frame)
File "C:\Users\compaq-pc\Anaconda3\lib\inspect.py", line 696, in getsourcefile
if getattr(getmodule(object, filename), '__loader__', None) is not None:
File "C:\Users\compaq-pc\Anaconda3\lib\inspect.py", line 733, in getmodule
if ismodule(module) and hasattr(module, '__file__'):
File "C:\Users\compaq-pc\Anaconda3\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
from tensorflow._api.v1 import image
File "C:\Users\compaq-pc\Anaconda3\lib\site-packages\tensorflow\__init__.py", line 44, in _load
from tensorflow._api.v1 import distributions
File "C:\Users\compaq-pc\Anaconda3\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core'