dbcli / litecli

CLI for SQLite Databases with auto-completion and syntax highlighting
https://litecli.com
BSD 3-Clause "New" or "Revised" License
2.12k stars 68 forks source link

Not sure if I have installed properly - litecli command not found #69

Closed kishvanchee closed 5 years ago

kishvanchee commented 5 years ago

I get the following error.

litecli: command not found

I installed using pip

python3 -m pip install -U litecli

pip3 freeze | grep litecli gives me this

litecli==1.1.0

Can you please point out where I might be going wrong?

Ubuntu 18.04

EDIT: quickly tested it using a virtual environment. It works there, but not in my base system.

Also, unrelated to this, is it possible to create a deb/ubuntu package at apt or something? Doesn't that make it easier to install? If no one has done it and if you can guide me, I can give it a try.. (?)

amjith commented 5 years ago

@kishvanchee I'm guessing that the bin folder for your python3 site-packages is not in your path.

My recommendation is to use a virtualenv. If you don't want to deal with activating virutalenvs to use litecli, you can try pipx

I would prefer if someone creates a deb package, unfortunately, I'm not familiar with the steps required to do that.

kishvanchee commented 5 years ago

@amjith You're correct. I just checked it now. My site-packages is not in my path. I actually didn't expect this in the first place. Thank you.

I notice that I have installed pgcli with pip but it's in my path - /home/kishore/.local/bin/pgcli. Am I missing something here for litecli which does not do the same as pgcli installation? Why litecli requires a virtualenv vs pgcli?

which pgcli does not give any output.

I will try creating a deb file then. Hopefully all works well.

EDIT: Please note that I have not added the site-packages to my path, but pgcli pip install gives pgcli in my path, but not litecli.

thorstenkampe commented 5 years ago

Litecli installs to /usr/local/bin. If you need to run python3 -m pip install instead of pip3 install that would suggest that /usr/local/bin is not in your $PATH.

kishvanchee commented 5 years ago

@thorstenkampe It's funny, I don't understand. Previously it wasn't there in my path, but now it is. Both my python3 -m pip install and pip3 install give the proper output now. I have no idea how to debug this, but ya problem somehow resolved I guess...

My /usr/local/bin is in my $PATH. I have double checked this.

I see that now the commands are present in ~/.local/bin/. I find this weird since I can't reproduce the same error again.

Closing this issue for now.