gpt4 book ai didi

python - 在 Ubuntu 16.04 上安装 Tensorflow

转载 作者:行者123 更新时间:2023-11-28 18:30:28 26 4
gpt4 key购买 nike

我尝试在 Ubuntu 16.04 上安装 Tensorflow,但是

Collecting tensorflow==0.7.1 from https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl
Using cached https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl
Requirement already up-to-date: numpy>=1.8.2 in /usr/local/lib/python2.7/dist-packages (from tensorflow==0.7.1)
Requirement already up-to-date: six>=1.10.0 in /usr/local/lib/python2.7/dist-packages (from tensCollecting tensorflow==0.7.1 from https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl
Using cached https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl
Requirement already up-to-date: numpy>=1.8.2 in /usr/local/lib/python2.7/dist-packages (from tensorflow==0.7.1)
Requirement already up-to-date: six>=1.10.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow==0.7.1)
Requirement already up-to-date: protobuf==3.0.0b2 in /usr/local/lib/python2.7/dist-packages (from tensorflow==0.7.1)
Requirement already up-to-date: wheel in /usr/lib/python2.7/dist-packages (from tensorflow==0.7.1)
Requirement already up-to-date: setuptools in /usr/local/lib/python2.7/dist-packages (from protobuf==3.0.0b2->tensorflow==0.7.1)
Installing collected packages: tensorflow
Found existing installation: tensorflow 0.7.1
Uninstalling tensorflow-0.7.1:
Successfully uninstalled tensorflow-0.7.1
Successfully installed tensorflow-0.7.1
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
milenko@milenko-HP-Compaq-6830s:~$ python
Python 2.7.11 |Continuum Analytics, Inc.| (default, Dec 6 2015, 18:08:32)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import tensorflow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named tensorflow
orflow==0.7.1)

我用过 sudo -H ,所以我不明白为什么会这样。我的 Python 安装

readlink -f $(which python) | xargs -I % sh -c 'echo -n "%: "; % -V'
/home/milenko/miniconda2/bin/python2.7: Python 2.7.11 :: Continuum Analytics, Inc.

最佳答案

它对我有用 this tutorial.

我使用的是 Anaconda 2.7 版本并创建了一个虚拟环境(可以随意使用 py3 & python=3.5):

conda create --name py2 python=2.7 anaconda

不要忘记在安装前激活它(然后使用!):

source activate py2

我建议升级 scikit-learn 和 libgcc:

conda upgrade scikit-learn libgcc

然后按照链接的教程进行操作。

自从您 5 个月前询问以来,我认为这已经发生了很大变化,但我希望它能帮助那些偶然发现这篇文章的人。在您的情况下,我认为这确实是 miniconda 和系统 python 发行版之间的冲突。

关于python - 在 Ubuntu 16.04 上安装 Tensorflow,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37928480/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com