Tensorflow可以在jupyter笔记本电脑上正常工作,但是当我尝试
import tensorflow
在pycharm或只是在终端,我得到
Traceback (most recent call last):
File "C:/Users/g-odi/Downloads/ipy/Deep-Learning-with-TensorFlow-book/ch03/main.py", line 5, in
<module>
import tensorflow as tf
File "C:\Users\g-odi\AppData\Local\conda\conda\envs\facat\lib\site-packages\tensorflow\__init__.py",
line 98, in <module>
from tensorflow_core import *
File "C:\Users\g-odi\AppData\Local\conda\conda\envs\facat\lib\site-
packages\tensorflow_core\__init__.py", line 40, in <module>
from tensorflow.python.tools import module_util as _module_util
ModuleNotFoundError: No module named 'tensorflow.python.tools'; 'tensorflow.python' is not a package
pycharm可以在解释器中找到张量流: packages
tensorflow已经安装,我可以在jupyter或ipython上使用它 enter image description here