0

I have Termux app installed on my Android phone. Is there a speed test tool that I can install and use from the command line? I have tried speedtest-cli, installed it by:

pip install speedtest-cli
pip install speedtest-cli --upgrade

I also have python installed.

When trying to use speedtest-cli it gives me error:

Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/speedtest.py", line 1401, in shell
    speedtest = Speedtest()
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/speedtest.py", line 743, in _init_
    self.get_config()
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/speedtest.py", line 765, in get_config
    raise ConfigRetrievalError(e)
speedtest.ConfigRetrievalError: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/bin/speedtest-cli", line 11, in <module>
    sys.exit(main())
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/speedtest.py", line 1498, in main
    shell()
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/speedtest.py", line 1402, in shell
    except (ConfigRetrievalError, HTTP_ERRORS):
TypeError: catching classes that do not inherit from BaseException is not allowed

How do I get a working command-line speedtest tool in Android and Termux?

migrated from superuser.com Dec 31 '17 at 10:57

This question came from our site for computer enthusiasts and power users.

0

We can run an script called speedtest.py localized in Github

python speedtest.py

  • I'm trying to place that script inside the python working directory /data/data/com.termux/files/usr/bin/python but it turns out I can't access it unless I root my phone (Nougat). Is there a way to set an external python path outside the termux directory? – FartVader Jan 1 '18 at 2:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.