The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

import Tensorflow

import Tensorflow

0
Votes
2
Answer

Hello!
I have added this code “import tensorflow as tf” 
I tried to run it but I got this error message:
ERROR:root:Internal Python error in the inspect module. Below is the traceback from this internal error. ERROR:root:Internal Python error in the inspect module. Below is the traceback from this internal error.
Followed with a really long error message, here is part of it: 

ImportError: DLL load failed: The specified module could not be found. During handling of the above exception, another exception occurred:

 

 

2 Answers

365 Team

Hi there,
Unfortuantely, there is one last line that you did not manage do paste. 
After ‘another exception occurred:’  , there is a an error which has been described. What error is it?
Best,
Iliya

Hi, Sorry about that, here is the line: raceback (most recent call last):
File “D:\anaconda3\lib\site-packages\IPython\core\interactiveshell.py”, line 3331, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File “”, line 4, in
import tensorflow as tf
File “D:\anaconda3\lib\site-packages\tensorflow\__init__.py”, line 101, in
from tensorflow_core import *
File “D:\anaconda3\lib\site-packages\tensorflow_core\__init__.py”, line 40, in
from tensorflow.python.tools import module_util as _module_util
File “D:\anaconda3\lib\site-packages\tensorflow\__init__.py”, line 50, in __getattr__
module = self._load()
File “D:\anaconda3\lib\site-packages\tensorflow\__init__.py”, line 44, in _load
module = _importlib.import_module(self.__name__)
File “D:\anaconda3\lib\importlib\__init__.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “D:\anaconda3\lib\site-packages\tensorflow_core\python\__init__.py”, line 49, in
from tensorflow.python import pywrap_tensorflow
File “D:\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File “D:\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import * And still a lot of lines

8 months

0
Votes

Please anyone can help?

Hi, can you please post the full stacktrace? Also can you send me the versions of Python and Tensorflow that your conda environment is using (you can use `pip show`). Thanks!

8 months

Latest versions. I just installed it few days ago

8 months

I tried pip show python and it says: WARNING: Package(s) not found: python while tensorflow is 2.1.0

8 months

As a first step, I would suggest the following. Make a new conda environment following all setup steps just as before, except when installing TF use: `pip install tensorflow==2.0` instead of simply `pip install tensorflow`. Afterwards, don’t forget to activate the conda environment. This way we would rule out any TF version-related issues first. Let me know whether this fixes the issue!

8 months
×
Online Data Science Training
SAVE 60%