2024-04-26 03:46:17 发布
网友
我已经在Windows64位上安装了Anaconda。我下载了创建项目的PyCharm,并在PyCharm的终端中使用以下命令安装了numpy、scipy、matplotlib:
numpy
scipy
matplotlib
conda install numpy conda install scipy conda install matplotlib
我不能像安装其他软件包那样安装Tensorflow。我应该如何安装它?
要在windows上安装TF,请执行以下步骤:
conda create --name tensorflow python=3.5 activate tensorflow conda install jupyter conda install scipy pip install tensorflow-gpu
使用pip install tensorflow代替pip install tensorflow-gpu,以防您想要安装TF的纯CPU版本。
pip install tensorflow
pip install tensorflow-gpu
注意:此安装已通过Anaconda Python 3.5(64位)测试。我也尝试过(a)Anaconda Python 3.6(32位),(b)Anaconda Python 3.6(64位)和(c)Anaconda Python 3.5(32位)的相同安装步骤,但都失败了(a),(b)和(c)。
目前,tensorflow只为基于Unix的操作系统(即ubuntumacosx)提供二进制文件,这就是为什么在setup docs中没有提到Windows的原因。
关于Github有很多讨论:
ASO回答-tensorflow — is it or will it (sometime soon) be compatible with a windows workflow?
建议:
For now, on Windows, the easiest way to get started with TensorFlow would be to use Docker: http://tensorflow.org/get_started/os_setup.md#docker-based_installationIt should become easier to add Windows support when Bazel (the build system we are using) adds support for building on Windows, which is on the roadmap for Bazel 0.3. You can see the full Bazel roadmap here.
For now, on Windows, the easiest way to get started with TensorFlow would be to use Docker: http://tensorflow.org/get_started/os_setup.md#docker-based_installation
It should become easier to add Windows support when Bazel (the build system we are using) adds support for building on Windows, which is on the roadmap for Bazel 0.3. You can see the full Bazel roadmap here.
或者只需使用Linux虚拟机(使用VMPlayer),所述步骤将为您设置它。
对于PyCharm-一旦创建conda环境,您需要将新的解释程序(在conda环境中)设置为interpretor以在PyCharm中使用:
conda
interpretor
PyCharm
现在要使用PyCharm中的conda解释器,请转到文件>;设置>;项目>;解释器,在项目解释器字段(小齿轮)中选择添加本地,然后浏览解释器或过去这条路。
默认位置-环境位于conda_root/envs/tensorflow下。新的python解释器将位于conda_root/envs/tensorflow/bin/pythonX.X,这样site-packages将位于conda_root/envs/tensorflow/lib/pythonX.X/site-packages。
conda_root/envs/tensorflow
conda_root/envs/tensorflow/bin/pythonX.X
site-packages
conda_root/envs/tensorflow/lib/pythonX.X/site-packages
谷歌最近推出了一个更新版本的TessorFlow r0.12,其中包括对Windows的支持CPU和GPU版本现在都可以使用Python>;=3.5.2(仅64位)版本安装。
对于仅限CPU版本,打开命令提示符并输入follow command
pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.0rc0-cp35-cp35m-win_amd64.whl
请按照此Tensorflow on Windows执行逐步说明。
更新
要安装当前最新版本,请运行以下命令:
pip install tensorflow #CPU only pip install tensorflow-gpu #For GPU support
要在windows上安装TF,请执行以下步骤:
使用
pip install tensorflow
代替pip install tensorflow-gpu
,以防您想要安装TF的纯CPU版本。注意:此安装已通过Anaconda Python 3.5(64位)测试。我也尝试过(a)Anaconda Python 3.6(32位),(b)Anaconda Python 3.6(64位)和(c)Anaconda Python 3.5(32位)的相同安装步骤,但都失败了(a),(b)和(c)。
目前,tensorflow只为基于Unix的操作系统(即ubuntumacosx)提供二进制文件,这就是为什么在setup docs中没有提到Windows的原因。
关于Github有很多讨论:
ASO回答-tensorflow — is it or will it (sometime soon) be compatible with a windows workflow?
建议:
或者只需使用Linux虚拟机(使用VMPlayer),所述步骤将为您设置它。
对于PyCharm-一旦创建
conda
环境,您需要将新的解释程序(在conda环境中)设置为interpretor
以在PyCharm
中使用:现在要使用PyCharm中的conda解释器,请转到文件>;设置>;项目>;解释器,在项目解释器字段(小齿轮)中选择添加本地,然后浏览解释器或过去这条路。
默认位置-环境位于
conda_root/envs/tensorflow
下。新的python解释器将位于conda_root/envs/tensorflow/bin/pythonX.X
,这样site-packages
将位于conda_root/envs/tensorflow/lib/pythonX.X/site-packages
。谷歌最近推出了一个更新版本的TessorFlow r0.12,其中包括对Windows的支持CPU和GPU版本现在都可以使用Python>;=3.5.2(仅64位)版本安装。
对于仅限CPU版本,打开命令提示符并输入follow command
请按照此Tensorflow on Windows执行逐步说明。
更新
要安装当前最新版本,请运行以下命令:
相关问题 更多 >
编程相关推荐