Python 没有名为“tqdm”的模块

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/47529792/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 18:14:37  来源:igfitidea点击:

No module named 'tqdm'

pythontensorflowpixelrnntqdm

提问by A. Syam

I am running the following pixel recurrent neural network (RNN) code using Python 3.6

我正在使用 Python 3.6 运行以下像素循环神经网络 (RNN) 代码

import os
import logging

import numpy as np
from tqdm import trange
import tensorflow as tf

from utils import *
from network import Network
from statistic import Statistic

However, there was an error:

但是,出现了一个错误:

ModuleNotFoundError: No module named 'tqdm'

Does anyone know how to solve it?

有谁知道如何解决它?

回答by pushpendra chauhan

You need to install tqdm module, you can do it by using python pip.

您需要安装 tqdm 模块,您可以使用 python pip 来完成。

pip install tqdm

for more info tqdm

更多信息tqdm

回答by Mark A. Donohoe

For Python 3 as you specified, you use the pip3command, like so...

对于您指定的 Python 3,您可以使用pip3命令,就像这样......

pip3 install tqdm

For Python 2, you use pipcommand, like so...

对于 Python 2,你使用pip命令,就像这样......

pip install tqdm

Hope this helps!

希望这可以帮助!

回答by Victor

In Anaconda this worked for me:

在 Anaconda 这对我有用:

sudo <anaconda path>/bin/python3.6 -m pip install tqdm 

(after your working env is activated)

(在您的工作环境被激活后)

On my linux machine I substituted <anaconda path>with:

在我的 linux 机器上,我替换<anaconda path>为:

anaconda3

Ubuntu machines:

Ubuntu机器:

sudo /usr/bin/python3.5 -m pip install tqdm

回答by Nages

In Anaconda, steps to install the package.

在 Anaconda 中,安装包的步骤。

  1. Navigate to ‘Environments” and Search for your package.
  2. That package will be displayed and click on Apply.
  1. 导航到“环境”并搜索您的包裹。
  2. 将显示该包并单击应用。

Now the package is installed and it can be used right away.

现在该包已安装,可以立即使用。

Please share your feedback.

请分享您的反馈。

回答by Nelson Bape

or you can use conda install -c conda-forge tqdmSometimes help

或者你可以使用conda install -c conda-forge tqdm有时帮助