Skip to main content
 首页 » 编程设计

python之如何在 Visual Studio 2017 预览版中使用 tensorflow

2025年05月04日26xing901022

我有 visual studio 2017 的 Python 工具。我想安装 tensorflow。我已经使用带有此命令的 CMD 安装了它

pip3 install --upgrade tensorflow 

然后窗口提示安装成功。但是,当我尝试在 VS 的 Python 项目中使用 tensorflow 时,找不到该模块。我在这里做错了什么?

我在安装 python 包的解决方案中找到了这个菜单,但它们都不适用于 tensorflow,并给我这个错误:

    ----- Installing 'tensorflow==1.0.1' ----- 
Collecting tensorflow==1.0.1 
  Could not find a version that satisfies the requirement tensorflow==1.0.1 (from versions: ) 
No matching distribution found for tensorflow==1.0.1 
----- Failed to install 'tensorflow==1.0.1' ----- 

请您参考如下方法:

我想通了。 Python 3.6 环境不支持 Tensorflow。