Hi, I am trying to import TensorFlow using Anaconda in Spyder. The python version I am using is 3.10.13. But I get the following error:
Traceback (most recent call last):
File ~\anaconda3\envs\spyder-env\Lib\site-packages\IPython\core\async_helpers.py:129 in _pseudo_sync_runner
coro.send(None)
File ~\anaconda3\envs\spyder-env\Lib\site-packages\IPython\core\interactiveshell.py:3305 in run_cell_async
self.displayhook.exec_result = result
File ~\anaconda3\envs\spyder-env\Lib\site-packages\traitlets\traitlets.py:729 in __set__
self.set(obj, value)
File ~\anaconda3\envs\spyder-env\Lib\site-packages\traitlets\traitlets.py:703 in set
new_value = self._validate(obj, value)
File ~\anaconda3\envs\spyder-env\Lib\site-packages\traitlets\traitlets.py:735 in _validate
value = self.validate(obj, value)
File ~\anaconda3\envs\spyder-env\Lib\site-packages\traitlets\traitlets.py:2144 in validate
# if isinstance(value, self.klass): # type:ignore[arg-type]
TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union
ERROR! Session/line number was not unique in database. History logging moved to new session 34
The corresponding part in the code in traitlets.py is:
def validate(self, obj, value):
assert self.klass is not None
if isinstance(value, self.klass): # type:ignore[arg-type]
return value
else:
self.error(obj, value)
Is there someone that can help me out?