简体   繁体   中英

Use Python Github Repository in Google Colab

I'm trying to clone a Github Repository in Colab and run it. The problem is that Colab says that it couldn't import tqdm.contrib, even if tqdm is contained in Colab.

import os

!git clone https://github.com/scorpion3013/checkolotl
os.chdir("checkolotl/")
!python3 main.py

main.py calls other .py files and it completely works on my PC.

Traceback (most recent call last):
  File "main.py", line 3, in <module>
    import checkolotl.proxy as proxychecker
  File "/content/checkolotl/checkolotl/proxy.py", line 3, in <module>
    from checkolotl.status import create_bar
  File "/content/checkolotl/checkolotl/status.py", line 4, in <module>
    from tqdm.contrib import DummyTqdmFile
ModuleNotFoundError: No module named 'tqdm.contrib'

tqdm (progress bars) has its own limitations.
In another project ( keras-team/autokeras ), tqdm was not working either ( issue 307 ) on Google Colab due to the lack of ipywidgets.

This was the PR done in that other project to resolve the issue.
Maybe it can be adapted here.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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