安装 Tensorflow 时出错 - Python 3.8 [英] Error when installing Tensorflow - Python 3.8

查看:64
本文介绍了安装 Tensorflow 时出错 - Python 3.8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是编程新手,并且正在学习必须安装 Tensorflow 的课程.问题是我使用的是 Python 3.8,我知道 Tensorflow 不支持它.

我已经下载了 Python 3.6,但我不知道如何将其切换为我的默认 Python 版本.

最好使用 python 3.6 为我的程序设置一个 venv 并在这个 venv 中安装 Tensorflow?

另外,我使用 Windows 和 Powershell.

解决方案

Tensorflow 目前只支持到 python 3.7.你可以在这里查看:https://www.tensorflow.org/install/pip

但是有一种方法可以在 Python3.8 上安装它,只需运行以下命令即可完成您的工作:

python -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl

这个命令在 mac 和 windows 上都可以使用,我没有在 Linux 上测试过.

I'm new to programming and following a course where I must install Tensorflow. The issue is that I'm using Python 3.8 which I understand isn't supported by Tensorflow.

I've downloaded Python 3.6 but I don't know how to switch this as my default version of python.

Would it be best to set up a venv using python 3.6 for my program and install Tensorflow in this venv?

Also, I using Windows and Powershell.

解决方案

Tensorflow is only supported until python 3.7 as of now. You can check it here: https://www.tensorflow.org/install/pip

But there is a way to install it on Python3.8, just run the below command that will do your job:

python -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl

This command work on mac and windows both, I haven't tested on Linux.

这篇关于安装 Tensorflow 时出错 - Python 3.8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆