I'm trying to install speedtest-cli
with pip and I'm getting errors that speedtest-cli
is not intalled.
ubuntu@vostro:~$ pip install --user speedtest-cli
Collecting speedtest-cli
Using cached https://files.pythonhosted.org/packages/61/8b/58d1de9a7fff3e91c5ab956ab4ba72b49f42d9f73d5f3e248c740dfcc816/speedtest_cli-2.1.1-py2.py3-none-any.whl
Installing collected packages: speedtest-cli
Successfully installed speedtest-cli-2.1.1
ubuntu@vostro:~$ speedtest-cli
-bash: /usr/bin/speedtest-cli: No such file or directory
But speedtest-cli
is correctly installed in /home/ubuntu/.local/lib/python2.7/site-packages
and I can run it by doing python speedtest.py
on that folder.
All those folders belong to the user ubuntu
, but something I think is wrong is that the py and pyc files are not executable. (They weren't by default, I didn't change anything)
ubuntu@vostro:~/.local/lib/python2.7/site-packages$ ll
total 132K
drwxrwxr-x 2 ubuntu ubuntu 4,0K jun 02 2019 23:55 speedtest_cli-2.1.1.dist-info
-rw-rw-r-- 1 ubuntu ubuntu 1,2K jun 02 2019 23:55 speedtest_cli.py
-rw-rw-r-- 1 ubuntu ubuntu 62K jun 02 2019 23:55 speedtest.py
-rw-rw-r-- 1 ubuntu ubuntu 590 jun 02 2019 23:55 speedtest_cli.pyc
-rw-rw-r-- 1 ubuntu ubuntu 56K jun 02 2019 23:55 speedtest.pyc
And this is the output of python -m site
ubuntu@vostro:~/.local/lib/python2.7/site-packages$ python -m site
sys.path = [
'/home/ubuntu/.local/lib/python2.7/site-packages',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
]
USER_BASE: '/home/ubuntu/.local' (exists)
USER_SITE: '/home/ubuntu/.local/lib/python2.7/site-packages' (exists)
ENABLE_USER_SITE: True
I think the problem is related to the env properties, but looking at that output I'm not so sure anymore.
--user
? It looks like it still thinks there's a global binary installed.pip install --user ...
should install it to$HOME/.local/bin/speedtest-cli
– SHawarden Jun 03 '19 at 00:31apt
, but the version on the repos is very outdated. Later I found in https://askubuntu.com/a/269821/918690 that it's better to use the pip method. – Deses Jun 03 '19 at 00:45So yes, it's fixed... thank you! If you post it as an answer I'll mark this as solved. :)
– Deses Jun 03 '19 at 01:07