spyder 4.1.0 crashing after conda update --all - anaconda

I recently ran 'conda update --all' and afterwards, spyder will not start and crashes everytime I try to open it. Error report provided.
Has anyone else has difficulties opening spyder since updating anaconda packages?
Traceback (most recent call last):
File "C:\Users\username\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3705, in main
mainwindow = run_spyder(app, options, args)
File "C:\Users\username\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3555, in run_spyder
main.setup()
File "C:\Users\username\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 973, in setup
'spyder.plugins.{}'.format(plugin_name))
File "C:\Users\username\AppData\Local\Continuum\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 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\username\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\plugins\pylint\__init__.py", line 14, in <module>
from .plugin import Pylint as PLUGIN_CLASS
File "C:\Users\username\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\plugins\pylint\plugin.py", line 29, in <module>
from spyder.plugins.pylint.confpage import PylintConfigPage
File "C:\Users\username\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\plugins\pylint\confpage.py", line 16, in <module>
from spyder.plugins.pylint.widgets.pylintgui import PylintWidget
File "C:\Users\username\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\plugins\pylint\widgets\pylintgui.py", line 37, in <module>
from spyder.plugins.pylint.utils import get_pylintrc_path
File "C:\Users\username\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\plugins\pylint\utils.py", line 16, in <module>
import pylint.config
File "C:\Users\username\AppData\Local\Continuum\anaconda3\lib\site-packages\pylint\config.py", line 54, in <module>
import toml
ModuleNotFoundError: No module named 'toml'

Related

Tensorflow 1.15.4 Docker installation not working correctly

I am trying to run TF in Docker but I have the following error:
ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3331, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-3-046e52e45c8c>", line 1, in <module>
ner = build_model("ner_bert_slav.json", download=False)
File "/opt/conda/lib/python3.7/site-packages/deeppavlov/core/commands/infer.py", line 62, in build_model
component = from_params(component_config, mode=mode, serialized=component_serialized)
File "/opt/conda/lib/python3.7/site-packages/deeppavlov/core/common/params.py", line 95, in from_params
obj = get_model(cls_name)
File "/opt/conda/lib/python3.7/site-packages/deeppavlov/core/common/registry.py", line 74, in get_model
return cls_from_str(_REGISTRY[name])
File "/opt/conda/lib/python3.7/site-packages/deeppavlov/core/common/registry.py", line 42, in cls_from_str
return getattr(importlib.import_module(module_name), cls_name)
File "/opt/conda/lib/python3.7/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 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/opt/conda/lib/python3.7/site-packages/deeppavlov/models/preprocessors/bert_preprocessor.py", line 20, in <module>
from bert_dp.tokenization import FullTokenizer
File "/opt/conda/lib/python3.7/site-packages/bert_dp/tokenization.py", line 25, in <module>
import tensorflow as tf
File "/opt/conda/lib/python3.7/site-packages/tensorflow/__init__.py", line 102, in <module>
from tensorflow_core import *
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/__init__.py", line 28, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "<frozen importlib._bootstrap>", line 1019, in _handle_fromlist
File "/opt/conda/lib/python3.7/site-packages/tensorflow/__init__.py", line 50, in __getattr__
module = self._load()
File "/opt/conda/lib/python3.7/site-packages/tensorflow/__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "/opt/conda/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/__init__.py", line 52, in <module>
from tensorflow.core.framework.graph_pb2 import *
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/core/framework/graph_pb2.py", line 16, in <module>
from tensorflow.core.framework import node_def_pb2 as tensorflow_dot_core_dot_framework_dot_node__def__pb2
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/core/framework/node_def_pb2.py", line 16, in <module>
from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/core/framework/attr_value_pb2.py", line 16, in <module>
from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/core/framework/tensor_pb2.py", line 16, in <module>
from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/core/framework/resource_handle_pb2.py", line 16, in <module>
from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/core/framework/tensor_shape_pb2.py", line 42, in <module>
serialized_options=None, file=DESCRIPTOR),
File "/opt/conda/lib/python3.7/site-packages/google/protobuf/descriptor.py", line 560, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 2044, in showtraceback
stb = value._render_traceback_()
AttributeError: 'TypeError' object has no attribute '_render_traceback_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/IPython/core/ultratb.py", line 1148, in get_records
return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
File "/opt/conda/lib/python3.7/site-packages/IPython/core/ultratb.py", line 316, in wrapped
return f(*args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/IPython/core/ultratb.py", line 350, in _fixed_getinnerframes
records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
File "/opt/conda/lib/python3.7/inspect.py", line 1502, in getinnerframes
frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
File "/opt/conda/lib/python3.7/inspect.py", line 1460, in getframeinfo
filename = getsourcefile(frame) or getfile(frame)
File "/opt/conda/lib/python3.7/inspect.py", line 696, in getsourcefile
if getattr(getmodule(object, filename), '__loader__', None) is not None:
File "/opt/conda/lib/python3.7/inspect.py", line 733, in getmodule
if ismodule(module) and hasattr(module, '__file__'):
File "/opt/conda/lib/python3.7/site-packages/tensorflow/__init__.py", line 50, in __getattr__
module = self._load()
File "/opt/conda/lib/python3.7/site-packages/tensorflow/__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "/opt/conda/lib/python3.7/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 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/__init__.py", line 33, in <module>
from tensorflow._api.v1 import audio
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/_api/v1/audio/__init__.py", line 10, in <module>
from tensorflow.python.ops.gen_audio_ops import decode_wav
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/ops/gen_audio_ops.py", line 11, in <module>
from tensorflow.python.eager import context as _context
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/eager/context.py", line 29, in <module>
from tensorflow.core.protobuf import config_pb2
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/core/protobuf/config_pb2.py", line 16, in <module>
from tensorflow.core.framework import cost_graph_pb2 as tensorflow_dot_core_dot_framework_dot_cost__graph__pb2
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/core/framework/cost_graph_pb2.py", line 16, in <module>
from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/core/framework/tensor_shape_pb2.py", line 42, in <module>
serialized_options=None, file=DESCRIPTOR),
File "/opt/conda/lib/python3.7/site-packages/google/protobuf/descriptor.py", line 560, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
I tried reinstalling TF with
pip uninstall -y tensorflow
pip install tensorflow==1.15.4
pip install tensorflow-gpu==1.15.4
but it still isn't working. Also, the __version__ method outputs the following error:
ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3331, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-11-65996cac02ec>", line 1, in <module>
tf.__version__
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/util/module_wrapper.py", line 193, in __getattr__
attr = getattr(self._tfmw_wrapped_module, name)
AttributeError: module 'tensorflow' has no attribute '__version__'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 2044, 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 "/opt/conda/lib/python3.7/site-packages/IPython/core/ultratb.py", line 1148, in get_records
return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
File "/opt/conda/lib/python3.7/site-packages/IPython/core/ultratb.py", line 316, in wrapped
return f(*args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/IPython/core/ultratb.py", line 350, in _fixed_getinnerframes
records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
File "/opt/conda/lib/python3.7/inspect.py", line 1502, in getinnerframes
frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
File "/opt/conda/lib/python3.7/inspect.py", line 1460, in getframeinfo
filename = getsourcefile(frame) or getfile(frame)
File "/opt/conda/lib/python3.7/inspect.py", line 696, in getsourcefile
if getattr(getmodule(object, filename), '__loader__', None) is not None:
File "/opt/conda/lib/python3.7/inspect.py", line 733, in getmodule
if ismodule(module) and hasattr(module, '__file__'):
File "/opt/conda/lib/python3.7/site-packages/tensorflow/__init__.py", line 50, in __getattr__
module = self._load()
File "/opt/conda/lib/python3.7/site-packages/tensorflow/__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "/opt/conda/lib/python3.7/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 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/__init__.py", line 33, in <module>
from tensorflow._api.v1 import audio
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/_api/v1/audio/__init__.py", line 10, in <module>
from tensorflow.python.ops.gen_audio_ops import decode_wav
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/ops/gen_audio_ops.py", line 11, in <module>
from tensorflow.python.eager import context as _context
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/eager/context.py", line 29, in <module>
from tensorflow.core.protobuf import config_pb2
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/core/protobuf/config_pb2.py", line 16, in <module>
from tensorflow.core.framework import cost_graph_pb2 as tensorflow_dot_core_dot_framework_dot_cost__graph__pb2
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/core/framework/cost_graph_pb2.py", line 16, in <module>
from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/core/framework/tensor_shape_pb2.py", line 42, in <module>
serialized_options=None, file=DESCRIPTOR),
File "/opt/conda/lib/python3.7/site-packages/google/protobuf/descriptor.py", line 560, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
Is there a step in the installation I am missing? I am using Jupyter notebook (jupyter/base-notebook:python-3.7.6) in Docker and restarted the kernel after reinstalling TF.

Eth-Brownie Installation error: Tried all 3 methods [linux]

I tried installing brownie via pipx, pip and the github repo , but each time I get this error on running brownie:
Traceback (most recent call last):
File "/usr/bin/brownie", line 33, in <module>
sys.exit(load_entry_point('eth-brownie==1.17.2', 'console_scripts', 'brownie')())
File "/usr/bin/brownie", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/__init__.py", line 6, in <module>
from brownie.project import compile_source, run
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/project/__init__.py", line 3, in <module>
from .main import ( # NOQA 401
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/project/main.py", line 45, in <module>
from brownie.network import web3
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/network/__init__.py", line 4, in <module>
from .account import Accounts
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/network/account.py", line 28, in <module>
from brownie.convert import EthAddress, Wei, to_address
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/convert/__init__.py", line 3, in <module>
from .datatypes import EthAddress, Fixed, Wei # NOQA: F401
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/convert/datatypes.py", line 8, in <module>
from vyper.exceptions import DecimalOverrideException
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/__init__.py", line 1, in <module>
from vyper.compiler import compile_code, compile_codes # noqa: F401
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/compiler/__init__.py", line 4, in <module>
from vyper.compiler import output
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/compiler/output.py", line 7, in <module>
from vyper.ast import ast_to_dict, parse_natspec
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/ast/__init__.py", line 19, in <module>
from . import expansion, folding # noqa: E402
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/ast/folding.py", line 5, in <module>
from vyper.builtin_functions import DISPATCH_TABLE
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/builtin_functions/__init__.py", line 1, in <module>
from .functions import * # noqa: F403
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/builtin_functions/functions.py", line 9, in <module>
from vyper.builtin_functions.convert import convert
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/builtin_functions/convert.py", line 6, in <module>
from vyper.builtin_functions.signatures import signature
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/builtin_functions/signatures.py", line 5, in <module>
from vyper.old_codegen.expr import Expr
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/old_codegen/expr.py", line 13, in <module>
from vyper.old_codegen import external_call, self_call
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/old_codegen/external_call.py", line 4, in <module>
from vyper.old_codegen.abi import abi_encode, abi_type_of
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/old_codegen/abi.py", line 4, in <module>
from vyper.old_codegen.parser_utils import (
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/old_codegen/parser_utils.py", line 42, in <module>
setcontext(DecimalContextOverride(prec=78))
File "/usr/lib/python3.9/_pydecimal.py", line 3898, in __init__
self.prec = prec if prec is not None else dc.prec
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/old_codegen/parser_utils.py", line 38, in __setattr__
raise DecimalOverrideException("Overriding decimal precision disabled")
vyper.exceptions.DecimalOverrideException: <exception str() failed>
Any help on fixing this would be appreciated.
I finally managed to solve this. I figured out that the error was due to vyper, as vyper --version also gave a similar error.
So, I went to the last exception raised:
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/old_codegen/parser_utils.py", line 38, in __setattr__
raise DecimalOverrideException("Overriding decimal precision disabled")
and opened the file mentioned ..../vyper/old_codegen/parser_utils.py, and commented the lines that were throwing the exception.
Image of the commented code.
This completely removed the error, as can be seen here. I don't know if it's the best approach, but it seems to be working.
Success!

Tensorflow GPU Installation Error, Windows 10

Hi I am trying to get Tensorflow GPU to work by installing CUDA, cuDNN etc. I have followed all the steps on the Tensorflow website as well as several installtion tutorials. However, I have been stuck for a while with the following error. Do anyone know what could possibly be wrong? Thanks in advance.
>>> import tensorflow
Traceback (most recent call last):
File "C:\Users\maxhx\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\maxhx\Anaconda3\envs\tensorflow\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 985, in _gcd_import
File "<frozen importlib._bootstrap>", line 968, in _find_and_load
File "<frozen importlib._bootstrap>", line 957, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 938, in create_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\maxhx\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\maxhx\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\maxhx\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\Users\maxhx\Anaconda3\envs\tensorflow\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\maxhx\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import *
File "C:\Users\maxhx\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\maxhx\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 52, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\maxhx\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\maxhx\Anaconda3\envs\tensorflow\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 985, in _gcd_import
File "<frozen importlib._bootstrap>", line 968, in _find_and_load
File "<frozen importlib._bootstrap>", line 957, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 938, in create_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\maxhx\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\maxhx\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\maxhx\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\Users\maxhx\Anaconda3\envs\tensorflow\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
Check the TensorFlow site for exactly the right set of file versions to use and where to check that the environment variables are correct. There were warnings to not use the latest CUDA or latest cuDNN. I could not get TensorFlow-GPU 1.6.0 to work with any of the CUDA9.x / cuDNN7.0.x combos in my Anaconda environment. My errors were similar to yours.
I downloaded TensorFlow-GPU 1.5.0 and it worked right away with CUDA 9.0 and cuDNN 7.0.5. Using Windows 10, Nvidia GTX 1070, and Python 3.5.4.
This site has a nice Python script to check if you can access the necessary files... https://www.codingforentrepreneurs.com/blog/install-tensorflow-gpu-windows-cuda-cudnn/ (though you might need to update it to check for the versions that you want.)

Tensorflow installation failed on Windows

I am trying to install TensorFlow on a Windows 10 machine (64bit). I am following the official instructions here: https://www.tensorflow.org/install/install_windows specifically those at "Installing with Anaconda".
All required dependencies (CUDA 8.0, CUDNN 6.1) are installed according to the guidance. The GPU is GTX1080.
The error messages are:
Python 3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC
v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
File "C:\Tools\Anaconda3\lib\site-
packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in
swig_import_helper
return importlib.import_module(mname)
File "C:\Tools\Anaconda3\lib\importlib\__init__.py", line 126, in
import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 906, in create_module
File "<frozen importlib._bootstrap>", line 222, in
_call_with_frames_removed
ImportError: DLL load failed: 找不到指定的模块。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Tools\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Tools\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Tools\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\Tools\Anaconda3\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Tools\Anaconda3\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import *
File "C:\Tools\Anaconda3\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Tools\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 52, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Tools\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\Tools\Anaconda3\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 906, in create_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: 找不到指定的模块。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Tools\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Tools\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Tools\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\Tools\Anaconda3\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
Failed to load the native TensorFlow runtime.
"找不到指定的模块" means "can't find specified module".
It is hard to tell the problem without further knowledge of your system settings. However, you may try the TensorFlow on Windows self-check code developed by mrry before running the installation.

Can't run TensorFlow-gpu on windows and anaconda

i spent two days trying to solve this but no luck.
i followed the steps on TensorFlow installing guide as is but still not working
this is the error :
(tensorflow) C:\WINDOWS\system32>python
Python 3.6.3 |Anaconda, Inc.| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
File "<frozen importlib._bootstrap>", line 571, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 922, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import *
File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 52, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
File "<frozen importlib._bootstrap>", line 571, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 922, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
i found many people online with the same problem :
https://github.com/tensorflow/tensorflow/issues/7705
but non of their solutions worked .
i have all the needed PATHs and NVIDIA drivers

Resources