简体   繁体   English

无法在 pycharm 中安装 tensorflow

[英]can't installing tensorflow in pycharm

So I am trying to install tensorflow for my pycharm to start learning Machine Learning, but I have been struggling for over 3 days trying to install it, and was wondering if anyone could help me.所以我正在尝试为我的 pycharm 安装 tensorflow 以开始学习机器学习,但我已经努力安装它超过 3 天,想知道是否有人可以帮助我。 Also, I have a question: Do I need Anaconda in order to install tensorflow, and if yes, then how do I get it for an earlier version of python because I can only get it for python 3.8, which I heard isn't compatible with tensorflow yet. Also, I have a question: Do I need Anaconda in order to install tensorflow, and if yes, then how do I get it for an earlier version of python because I can only get it for python 3.8, which I heard isn't compatible tensorflow 还没有。 Please help, Also: everytime I try to install tensorflow it says: ERROR.请帮助,另外:每次我尝试安装 tensorflow 时,它都会说:错误。 Could not find a version that satisfies the requirement tensorflow==1:5 ERROR, No matching distribution found for tensorflow.找不到满足要求的版本 tensorflow==1:5 错误,未找到 tensorflow 的匹配分布。 i have aready tried in pycharm going to the python interpreter and installing 2.4.0 it keeps giving me the same error as always我已经在 pycharm 中尝试过进入 python 解释器并安装 2.4.0 它总是给我与往常一样的错误

check https://pypi.org/project/tensorflow/1.5.1/#files检查https://pypi.org/project/tensorflow/1.5.1/#files

在此处输入图像描述

so you wanna install specific tf version?所以你想安装特定的 tf 版本?

Download.whl file then using pip install path/to/file.whl .下载.whl 文件,然后使用pip install path/to/file.whl

tensorflow==1.5.1 is compatible this list versions: tensorflow==1.5.1 兼容此列表版本:

在此处输入图像描述

Here is what I recommend:这是我的建议:

  1. Install Anaconda Anaconda Individual Edition安装Anaconda Anaconda个人版
  1. Open Anaconda Navigator打开 Anaconda 导航器
  2. Create a new environment called "tf".创建一个名为“tf”的新环境。 I had issues in one of my machines using python 3.8 with tf, i recommend to use python 3.7我的一台机器使用 python 3.8 和 tf 时遇到问题,我建议使用 python 3.7
  3. Still on the navigator screen, selected "Not Installed" on the dropdown and type "tensorflow" on the search box next to the dropdown.仍然在导航器屏幕上,在下拉列表中选择“未安装”,然后在下拉列表旁边的搜索框中输入“tensorflow”。 Install tensorflow on your tf environment.在您的 tf 环境中安装 tensorflow。
  4. open the command line and use: conda activate ft打开命令行并使用: conda activate ft

It looks like a lot but it takes a few minutes.看起来很多,但需要几分钟。 Then, in PyCharm, you can just select your conda environment.然后,在 PyCharm 中,您只需 select 您的 conda 环境即可。

I was a bit disappointed that PyCharm does not support jupyter notebooks anymore in the Community Edition so I decided to switch to Visual Studio Code.我有点失望 PyCharm 在社区版中不再支持 jupyter notebook,所以我决定切换到 Visual Studio Code。 You should check it out.你应该检查一下。 It is super easy and tons of plug-ins.这是超级简单和大量的插件。

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

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