HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

When I run mssql-cli, I get "No module named mssqlcli"

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
modulemssqlclimssqlnamedgetcliwhenrun

Problem

I just installed mssql-cli with pip,

pip3 install mssql-cli


Then I try to run mssql-cli and I get

$ mssql-cli
/usr/bin/python: No module named mssqlcli

Solution

I tried to fix this by submitting a patch #234 (approved but not yet committed). You'll have to edit the file ~/.local/bin/mssql-cli and replace

python -m mssqlcli.main "$@"


With this line

( command -v python3 && python3 -m mssqlcli.main "$@" ) || python -m mssqlcli.main "$@"

Code Snippets

python -m mssqlcli.main "$@"
( command -v python3 && python3 -m mssqlcli.main "$@" ) || python -m mssqlcli.main "$@"

Context

StackExchange Database Administrators Q#228277, answer score: 6

Revisions (0)

No revisions yet.