简体   繁体   English

pip install tensorflow-gpu在python 3.5中安装

[英]pip install tensorflow-gpu installing in python 3.5

I am trying to install tensorflow for python 2.7 on Ubuntu 16. I am using pip install tensorflow-gpu and I get the following message in the terminal: 我正在尝试在Ubuntu 16上为python 2.7安装tensorflow。我正在使用pip install tensorflow-gpu,并且在终端中收到以下消息:

pip install tensorflow-gpu

Requirement already satisfied: tensorflow-gpu in /usr/local/lib/python3.5/dist-packages Requirement already satisfied: wheel>=0.26 in /usr/lib/python3/dist-packages (from tensorflow-gpu) Requirement already satisfied: six>=1.10.0 in /usr/lib/python3/dist-packages (from tensorflow-gpu) Requirement already satisfied: numpy>=1.11.0 in /usr/local/lib/python3.5/dist-packages (from tensorflow-gpu) Requirement already satisfied: protobuf>=3.1.0 in /usr/local/lib/python3.5/dist-packages (from tensorflow-gpu) Requirement already satisfied: setuptools in /usr/local/lib/python3.5/dist-packages (from protobuf>=3.1.0->tensorflow-gpu) 已满足要求:/usr/local/lib/python3.5/dist-packages中的tensorflow-gpu已满足要求:在/ usr / lib / python3 / dist-packages中wheel> = 0.26(来自tensorflow-gpu)已满足要求:/ usr / lib / python3 / dist-packages中的六个> = 1.10.0(来自tensorflow-gpu)已满足要求:/usr/local/lib/python3.5/dist-packages中的numpy> = 1.11.0(来自tensorflow-gpu)已满足要求://usr/local/lib/python3.5/dist-packages中的protobuf> = 3.1.0(来自tensorflow-gpu)已满足要求:/ usr / local / lib / python3中的setuptools .5 / dist-packages(来自protobuf> = 3.1.0-> tensorflow-gpu)

When I ftry to import tensorflow It says ImportError: No module named tensorflow I am guessing since it is looking in the python 2.7 packages. 当我尝试import tensorflow它说ImportError: No module named tensorflow我猜ImportError: No module named tensorflow因为它正在python 2.7软件包中寻找。

Shouldn't it be looking in python 2.7 dist-packges? 它不应该在python 2.7 dist-packges中查找吗?

I would suggest you to use anaconda and run the following command 我建议您使用anaconda并运行以下命令

conda install -c anaconda tensorflow-gpu

  • Anaconda will make your life easier... hope this helps This will also install the cuda toolkit and cudnn for you and you are good to go Anaconda将使您的生活更轻松...希望对您cudnn帮助。这还将为您安装cuda toolkitcudnn ,您可以cudnn使用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM