【发布时间】:2020-07-07 14:30:34
【问题描述】:
我用python 3.6 和venv 创建了一个Conda 环境并激活了它。然后安装tensorflow与
pip install tensorflow
但是,我的 python 出了点问题。基本上就像我运行python 时一样:
Python 3.6.2 |Anaconda, Inc.| (default, Oct 5 2017, 07:59:26) [GCC 7.2.0] on linux
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'
但是python3.6 一切正常:
Python 3.6.10 | packaged by conda-forge | (default, Apr 24 2020, 16:44:11) [GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>>
我基本上想在命令行中输入“python”并与 tensorFlow 一起正常工作。
【问题讨论】:
标签: python python-3.x tensorflow conda