Когда я пытался import tensorflow
с моей Anaconda3, JupyterLab выдал это сообщение об ошибке:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-64156d691fe5> in <module>
----> 1 import tensorflow as tf
ModuleNotFoundError: No module named 'tensorflow'
Я уверен, что я установил TensorFlow на python и python3 на моем MacBook:
⋊> ~ pip3 show tensorflow 11:54:49
Name: tensorflow
Version: 1.13.0rc2
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: opensource@google.com
License: Apache 2.0
Location: /usr/local/lib/python3.7/site-packages
Requires: termcolor, tensorboard, keras-applications, keras-preprocessing, grpcio, numpy, six, absl-py, protobuf, wheel, astor, tensorflow-estimator, gast
Required-by:
import tensorflow
с python3 в терминале тоже было в порядке, но после того, как я добавил путь Anaconda к оболочке рыбы, он выдал следующее сообщение об ошибке:
⋊> ~ python3 12:09:48
Python 3.7.1 (default, Dec 14 2018, 13:28:58)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tensorflow'
>>>
Кроме того, я только что попробовалconda install tensorflow
, результат удара:
⋊> ~ conda install tensorflow
12:24:09
Solving environment: failed
UnsatisfiableError: The following specifications were found to be in conflict:
- anaconda==2018.12=py37_0 -> cython==0.29.2=py37h0a44026_0
- anaconda==2018.12=py37_0 -> mkl-service==1.1.2=py37hfbe908c_5
- anaconda==2018.12=py37_0 -> numexpr==2.6.8=py37h7413580_0
- anaconda==2018.12=py37_0 -> scikit-learn==0.20.1=py37h27c97d8_0
- tensorflow
Use "conda info <package>" to see the dependencies for each package.