环境:win10 Python3.6
首先,直接使用pip安装:pip install tqdm ,成功安装,但是导入不了tqdm进行使用。
import tqdm
from tqdm import tqdm
Traceback (most recent call last):File "D:\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2881, in run_codeexec(code_obj, self.user_global_ns, self.user_ns)File "<ipython-input-11-6b39a9324e6c>", line 1, in <module>from tqdm import tqdm
ImportError: cannot import name 'tqdm'
其次,使用.whl文件安装,成功安装,并进行使用。
安装.whl文件:
pip install E://安装包//tqdm-4.38.0-py2.py3-non-any.whl
注:tqdm-4.38.0-py2.py3-non-any.whl文件前加上.whl文件所在位置的绝对路径,或者在.whl文件所在位置打开和窗口,进行安装 pip install tqdm-4.38.0-py2.py3-non-any.whl
import tqdm
from tqdm import tqdm
import time
for i in tqdm(range(200)):time.sleep(0.02)
显示:
后来查看了下tqdm版本,发现原来的是4.33版,现在的是4.38版本,不知道是不是由于版本兼容问题。
#pip install tqdm >>>pip show tqdm
Name: tqdm
Version: 4.33.0
Summary: Fast, Extensible Progress Meter
Home-page: https://github.com/tqdm/tqdm
Author: None
Author-email: None
License: MPLv2.0, MIT Licences
Location: d:\anaconda3\lib\site-packages
Requires:
Required-by:#pip install tqdm-4.38.0-py2.py3-none-any.whl
>>>pip show tqdm
Name: tqdm
Version: 4.38.0
Summary: Fast, Extensible Progress Meter
Home-page: https://github.com/tqdm/tqdm
Author: None
Author-email: None
License: MPLv2.0, MIT Licences
Location: d:\anaconda3\lib\site-packages
Requires:
Required-by:
下载地址:tqdm-4.38.0-py2.py3-non-any.whl
链接:https://pan.baidu.com/s/1exrS3f2sXjqQVKBauRStAA
提取码:k3dw