python运行时:ModuleNotFoundError: No module named ‘tensorflow‘
https://blog.csdn.net/guangwulv/article/details/109559583
TensorFlow报错:
python或者anaconda运行时显示:
一般的解决方案:
pip install --upgrade --ignore-installed tensorflow
1
或者
pip install --user --upgrade --ignore-installed tensorflow
1
在DOS窗口运行结果如下:
输入以下命令也是报错:
pip install --upgrade --ignore-installed tensorflow-gpu
1
pip3 install tensorflow #cpu
1
pip3 install tensorflow-gpu
1
那么------既然找不到TensorFlow的版本,那我们就自行查找,输入:
pip3 search tensorflow
1
会出现一大堆的信息
tensorflow (2.3.1) - TensorFlow is an open source machine learning framework for
everyone.
tensorflow-qndex (0.0.22) - tensorflow-qnd x tensorflow-extenteten
tensorflow-plot (0.3.2) - TensorFlow Plot
tensorflow-addons (0.11.2) - TensorFlow Addons.
tensorflow-estimator (2.3.0) - TensorFlow Estimator.
tensorflow-ops (0.0.0) - tensorflow-ops
mesh-tensorflow (0.1.17) - Mesh TensorFlow
tensorflow-io (0.16.0) - TensorFlow IO
tensorflow-recommenders (0.2.0) - Tensorflow Recommenders, a TensorFlow library for recommender
systems.
tensorflow-datasets (4.1.0) - tensorflow/datasets is a library of datasets ready to use with
TensorFlow.
tensorflow-scientific (0.2.0.dev0) - Scientific modeling in TensorFlow
tensorflow-k8s (0.0.2) - Tensorflow serving extension
emloop-tensorflow (0.6.0) - TensorFlow extension for emloop.
axion-tensorflow (0.0.5) - axion for TensorFlow >=2.2.
daltons-tensorflow (0.0.17) - Daltons Tensorflow bindings
tensorflow-extenteten (0.0.22) - TensorFlow extention library
Tensorflow-ChatBots (0.0.12) - ChatBots supporting TensorFlow
cxflow-tensorflow (0.5.0) - TensorFlow extension for cxflow.
tensorflow-compression (1.3) - Data compression in TensorFlow
syft-tensorflow (0.1.0) - TensorFlow Bindings for PySyft
tensorflow-coder (0.0.2) - TensorFlow Coder (TF-Coder): A Program Synthesis Tool for
TensorFlow
dask-tensorflow (0.0.2) - Interactions between Dask and Tensorflow
tensorflow-tracer (1.1.0) - Runtime Tracing Library for TensorFlow
tensorflow-radam (0.15.0) - RAdam implemented in Keras & TensorFlow
redhat-tensorflow (0.0.0) - A build of TensorFlow by Red Hat
aicoe-tensorflow (0.0.0) - A build of TensorFlow by Red Hat
gmlsnets-tensorflow (0.1) - GMLS-Nets Tensorflow implementation
tensorflow-transform (0.25.0) - A library for data preprocessing with TensorFlow
rh-tensorflow (0.0.0) - A build of TensorFlow by Red Hat
sagemaker-tensorflow (2.3.0.1.0.0) - Amazon Sagemaker specific TensorFlow extensions.
tensorflow-manopt (0.1.0) - A library for manifold-constrained optimization in TensorFlow
tensorflow-qnd (0.1.11) - Quick and Dirty TensorFlow command framework
tensorflow-probability (0.11.1) - Probabilistic modeling and statistical inference in TensorFlow
tensorflow-determinism (0.3.0) - Tracking, debugging, and patching non-determinism in TensorFlow
tensorflow-model (0.1.1) - Command-line tool to inspect TensorFlow models
tensorflow-utils (0.1.0) - Classes and methods to make using TensorFlow easier
tensorflow-ranking (0.3.2) - Pip package setup file for TensorFlow Ranking.
tensorflow-cpu-estimator (1.15.1) - TensorFlow Estimator.
tensorflow-io-nightly (0.17.0.dev20201108041428) - TensorFlow IO
tensorflow-gpu-estimator (2.3.0) - TensorFlow Estimator.
tensorflow-lattice-gpu (0.9.8) - TensorFlow Lattice provides lattice models in TensorFlow
tensorflow-directml (1.15.3.dev200911) - TensorFlow is an open source machine learning framework for
everyone.
tensorflow-aarch64 (1.2) - Tensorflow r1.2 for aarch64[arm64,pine64] CPU only.
tensorflow-gan (2.0.0) - TF-GAN: A Generative Adversarial Networks library for TensorFlow.
tensorflow-tflex (1.13.1rc3) - TensorFlow is an open source machine learning framework for
everyone.
tensorflow-fedora28 (1.9.0rc0) - TensorFlow is an open source machine learning framework for
everyone.
tensorflow-federated (0.17.0) - TensorFlow Federated is an open-source federated learning
framework.
tensorflow-rl (0.2.2) - tensorflow-rl: Modular Deep Reinforcement Learning Framework.
tensorflow-gpu (2.3.1) - TensorFlow is an open source machine learning framework for
everyone.
intel-tensorflow (2.3.0) - TensorFlow is an open source machine learning framework for
everyone.
tensorflow-font2char2word2sent2doc (0.0.12) - TensorFlow implementation of Hierarchical Attention Networks for
Document Classification
tensorflow-template (0.2) - A tensorflow template for quick starting a deep learning project.
tensorflow-rocm (2.3.2) - TensorFlow is an open source machine learning framework for
everyone.
tensorflow-cpu (2.3.1) - TensorFlow is an open source machine learning framework for
everyone.
essentia-tensorflow (2.1b6.dev236) - Library for audio and music analysis, description and synthesis,
with TensorFlow support
tensorflow-quantum (0.4.0) - TensorFlow Quantum is a library for hybrid quantum-classical
machine learning.
tensorflow-encrypted (0.4.0) - Layer on top of TensorFlow for doing machine learning on
encrypted data.
tensorflow-text (2.3.0) - TF.Text is a TensorFlow library of text related ops, modules, and
subgraphs.
silence-tensorflow (1.1.1) - Simple python package to shut up Tensorflow warnings and logs.
tensorflow-cloud (0.1.9) - The TensorFlow Cloud repository provides APIs that will allow to
easily go from debugging and training your Keras and TensorFlow
code in a local environment to distributed training in the cloud.
tensorflow-fewshot (0.0.3) - A Python package for few shot learning training and inference in
computer vision using Tensorflow.
tensorflow-serving-client (1.0.0) - Python client for tensorflow serving
tensorflow-transform-canary (0.9.0) - A library for data preprocessing with TensorFlow
rav-tensorflow-transform (0.7.0.910) - A library for data preprocessing with TensorFlow
tensorflow-serving-api (2.3.0) - TensorFlow Serving Python API.
tensorflow-model-analysis (0.25.0) - A library for analyzing TensorFlow models
tensorflow-onmttok-ops (0.4.0) - OpenNMT Tokenizer as TensorFlow Operations
tensorflow-play (0.0.1) - The lightweight engineering TensorFlow wrapper for AI engineer.
Write less, Reuse more, Scale easily.
tensorflow-hub (0.10.0) - TensorFlow Hub is a library to foster the publication, discovery,
and consumption of reusable parts of machine learning models.
tensorflow-kernels (0.1.2) - A package with Tensorflow (both CPU and GPU) implementation of
most popular Kernels for kernels methods (SVM, MKL...).
tensorflow-graphics (2020.5.20) - A library that contains well defined, reusable and cleanly
written graphics related ops and utility functions for
TensorFlow.
tensorflow-io-2.0-preview (0.7.0.dev1369) - TensorFlow IO
tensorflow-constrained-optimization (0.2) - A library for performing constrained optimization in TensorFlow
ngraph-tensorflow-bridge (0.18.0) - Intel nGraph compiler and runtime for TensorFlow
tensorflow-technical-indicators (0.1.2) - Technical Indicators as TensorFlow Graph Functions
tensorflow-deploy-utils (1.0.0) - Utils for managing and communication with TensorFlow Deploy
intel-tensorflow-avx512 (2.3.0) - TensorFlow is an open source machine learning framework for
everyone.
tensorflow-federated-nightly (0.17.0.dev20201107) - TensorFlow Federated is an open-source federated learning
framework.
tensorflow-rocm-enhanced (2.3.2) - TensorFlow is an open source machine learning framework for
everyone.
simple-tensorflow-serving (0.8.1.1) - The simpler and easy-to-use serving service for TensorFlow models
Tensorflow-Telegram-Bot (0.0.2) - TensorFlow Telegram Bot which can be used as callback
tensorflow-serving-client-grpc (2.3.0) - A prebuilt tensorflow serving client from the tensorflow serving
proto files
neuraxle-tensorflow (0.1.2) - TensorFlow steps, savers, and utilities for Neuraxle. Neuraxle is
a Machine Learning (ML) library for building neat pipelines,
providing the right abstractions to both ease research,
development, and deployment of your ML applications.
attention-tensorflow-mesh (0.0.2) - A bunch of attention related functions, for constructing
transformers in tensorflow mesh
tensorflow-serving-api-gpu (2.3.0) - TensorFlow Serving Python API.
spark-tensorflow-distributor (0.1.0) - This package helps users do distributed training with TensorFlow
on their Spark clusters.
tensorflow-auto-detect (1.11.0) - Automatically install CPU or GPU tensorflow determined by looking
for a CUDA installation.
tensorflow-gcs-config (2.3.0) - TensorFlow operations for configuring access to GCS (Google
Compute Storage) resources.
sagemaker-tensorflow-training (20.1.4) - Open source library for creating TensorFlow containers to run on
Amazon SageMaker.
tensorflow-object-detection-api (0.1.1) - Tensorflow Object Detection Library Packaged
tensorflow-coder-colab-logging (0.0.2) - Logging utilities for TensorFlow Coder's Colab interface
tensorflow-serving-api-python3 (1.8.0) - *UNOFFICIAL* TensorFlow Serving API libraries for Python3
tensorflow-graphics-gpu (1.0.0) - A library that contains well defined, reusable and cleanly
written graphics related ops and utility functions for
TensorFlow.
yifeif-tensorflow-graphics (2020.6.11) - A library that contains well defined, reusable and cleanly
written graphics related ops and utility functions for
TensorFlow.
tensorflow-exercise-hx (1.0.1) - tensorflow练习:鸢尾花种
;类预测,加州房价
预测
tensorflow-enterprise-addons (0.1.1) - Client-side library suite of TensorFlow Enterprise on Google
CloudPlatform (GCP), which implements specific integration
between GCP andTensorFlow APIs.
tensorflow-consciousness (0.1) - Supports a variety of biological learning algorithms.
mlops-tensorflow (0.1.0) -
tensorflow-privacy (0.5.1) -
resnet-tensorflow (0.0.1) - Deep Residual Neural Network
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
查询python 的版本:
>>>C:\Users\pc>python
Python 3.9.0a4 (tags/v3.9.0a4:6e02691, Feb 25 2020, 23:23:54) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
1
2
3
-----------------------------发现问题----------------------
安装不成功的原因是:
1:电脑是32bit的
2:Python版本高于3.6
查询系统版本:
python -v
1
# D:\Python3.9\lib\__pycache__\_sitebuiltins.cpython-39.pyc matches D:\Python3.9\lib\_sitebuiltins.py
# code object from 'D:\\Python3.9\\lib\\__pycache__\\_sitebuiltins.cpython-39.pyc'
import '_sitebuiltins' # <_frozen_importlib_external.SourceFileLoader object at 0x000002885BD175E0>
import 'site' # <_frozen_importlib_external.SourceFileLoader object at 0x000002885BD05280>
Python 3.9.0a4 (tags/v3.9.0a4:6e02691, Feb 25 2020, 23:23:54) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
import 'atexit' # <class '_frozen_importlib.BuiltinImporter'>
>>>
1
2
3
4
5
6
7
8
如下图:Python是3.9 环境是64bit
版本高于3.6,打开Anaconda查看其Python版本
安装TensorFlow方法:
CPU版本的安装
pip install --ignore-installed --upgrade tensorflow
安装步骤:
1:TensorFlow在Windows下,支持Python 3.6版本
2:在DOS窗口中输入:[目的:输入清华仓库镜像,加快更新速度]
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
1
3:然后再输入:
conda config --set show_channel_urls yes
1
4:Anaconda3创建一个python3.6的环境,环境名称为tensorflow ,命令如下:
conda create -n tensorflow python=3.6
1
anaconda在这里的意思安装依赖包,所以要下载一会~~~~
5:询问是否安装:6:输入
>> y
1
然后开始出现下图的趋势:
-----done-------
此时的Anaconda已经显示在更新新动态
打开Anaconda>>Environments 就可看到TensorFlow的选项:
表示TensorFlow的环境已经建好:
7:在Anaconda的启动TensorFlow:
activate tensorflow
1
8:安装cpu版本的TensorFlow
pip install --upgrade --ignore-installed tensorflow
1
响应结果如下图:
当不使用TensorFlow时,可以通过deactivate来关闭TensorFlow环境:
>> deactivate
1
9:测试cpu版本的TensorFlow:
先启动:activate tensorflow
再进入Python:python
文章知识点与官方知识档案匹配,可进一步学习相关知识
————————————————
版权声明:本文为CSDN博主「lenatu」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/guangwulv/article/details/109559583
python运行时:ModuleNotFoundError: No module named ‘tensorflow‘的更多相关文章
- Python报错ModuleNotFoundError: No module named 'numpy'
转载:https://blog.csdn.net/qq_39779233/article/details/103224712 Python报错ModuleNotFoundError: No modul ...
- Anaconda3 tensorflow安装 及ModuleNotFoundError: No module named 'tensorflow' 解答
Anaconda3 的安装,参考:手把手教你如何安装Tensorflow(Windows和Linux两种版本) tensorflow的安装,参考:深度学习(TensorFlow)环境搭建:(三)Ubu ...
- linux/cmd中python路径导入ModuleNotFoundError: No module named 'xxx'
在linux或者直接在cmd中运行python文件时 会遇到导包错误的情况ModuleNotFoundError: No module named 'xxx’由于不在pycharm中 所以这里不能将上 ...
- Python学习:ModuleNotFoundError: No module named 'pygal.i18n' 的解决方法
最近在学<Python编程:从入门到实践>,16.2小结中 from pygal.i18n import COUNTRIES 获取两个字母的国别码,我用的pygal的版本是2.4.0(终端 ...
- Python 错误:ModuleNotFoundError: No module named 'conf'
问题描述: 编译器无法使用cmd命令来执行py文件,结果可能报ModuleNotFoundError的错误. 比如在cmd任务栏执行:python E:\myProgram\Python\spider ...
- Tensorflow机器学习入门——ModuleNotFoundError: No module named 'tensorflow.keras'
这个bug的解决办法: # from tensorflow.keras import datasets, layers, models from tensorflow.python.keras imp ...
- python异常之ModuleNotFoundError: No module named 'test01inner02'
当我们使用sys.path.append(args) 指令向程序中导入模块时其实本次append操作只是在内存中完成的,如果要永久性的添加需要修改环境变量. 我们发现当我们使用print(sys.pa ...
- jupyter notebook中No module named 'tensorflow'
当我们在jupyter notebook中运行时可能会遇见没有某个包的情况,如下: ---------------------------------------------------------- ...
- [error]ModuleNotFoundError: No module named 'MySQLdb'
错误详情(错误详情如标题,图是网上找的): 解决方法: 在项目目录下 settings.py 的同级目录中的 __init__.py 中加入如下代码: import pymysql pymysql ...
- 在用python操作mysql时报错:ModuleNotFoundError: No module named 'MySQLdb'
用Flask+python+mysql写一个小项目 系统 win10 py版本:3.6.1 在配置数据库时报错ModuleNotFoundError: No module named 'MySQLdb ...
随机推荐
- 模拟VL02N交货单批次拆分
昨天听到一个好玩的需求,自开发交货单批次拆分的界面和实现批次拆分. 批次拆分的函数就不提了,这里来说说自开发程序怎么模拟出批次拆分的那种样子.. 效果图: 1,首先定义一个交货行项目表和拆分出来的批次 ...
- UFT VBScripts sharing
- DotTrace系列:7. 诊断 托管和非托管 内存暴涨
一:背景 1. 讲故事 分析托管和非托管内存暴涨,很多人潜意识里都会想到抓dump上windbg分析,但我说可以用dottrace同样分析出来,是不是听起来有点让人惊讶,哈哈,其实很正常,它是另辟蹊径 ...
- 下一代 2D 图像设计工具「GitHub 热点速览」
长期以来,2D 设计领域似乎已是 Adobe 与 Figma 的天下,层叠的图层.熟悉的工具栏,一切都显得那么顺理成章,却也让不少设计师在创意的边界上感到了些许乏力.当我们以为设计工具的革新只能是小修 ...
- C# WinForm 窗体阴影
https://www.cnblogs.com/mqxs/p/9466218.html public class FormShadow : Form { public FormShadow() { I ...
- Google play安装不上Chrome
背景 今天我的(安卓-小米)手机上突然要用到chrome,于是打开了Google Play商店下载. 发现一个问题,每次下载到百分百后,安装进度就会一闪而过,进而重新下载. 我尝试安装chrome b ...
- css box-sizing的例子
转载自 http://www.cnblogs.com/zhaoran/archive/2013/05/24/3097482.html css3 box-sizing属性 box-sizing属性可以为 ...
- leetcode 1406
简介 国服第一的刷题视频 参考链接 https://www.bilibili.com/video/BV1W54y197NM?from=search&seid=16875469481128889 ...
- POLIR-Mind-Cognition-Neural Models-NLP(Neuro-Linguistic Programming) 思维逻辑层级(logical Levels)-理解+解决问题-无敌洞察力+高维思路-{精神,身份,价值,能力,行为,环境}
Neuro-Linguistic Programming-百知思维模型-NLP理解层次 能给你无敌洞察力+高维思路 https://v.douyin.com/iS74bMKr/ 最重要的两种能力: 目 ...
- win10系统电脑设置打印机连接的方法
有不少深度技术用户,不管说工作还是家里办公都需要使用到打印机.不过有小伙伴对win10系统不太熟悉,不知道如何找到打印机,也不知道设置在哪里,那么win10纯净版电脑打印机如何连接呢?接下来,深度技术 ...