mssql-cli
mssql-cli copied to clipboard
Not working with Python 3.8
Hi, this tool doesn't seem to work with recent versions of Python 3.
# mssql-cli
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.8/dist-packages/mssqlcli/main.py", line 11, in <module>
from mssqlcli.config import config_location
ImportError: cannot import name 'config_location' from 'mssqlcli.config' (/usr/local/lib/python3.8/dist-packages/mssqlcli/config.py)
Thanks!
Python 3.8 should work. Could you provide some more details so that we can try and reproduce this issue such as:
- OS version and arch
- mssql-cli version
- Output of
pip freezecommand.
Looks like it might be a conflict with the package "mssqlcli".
I was having the same issue with python3.6 and mssql-cli-1.0.0
$ mssql-cli
Traceback (most recent call last):
File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/astram/.local/lib/python3.6/site-packages/mssqlcli/main.py", line 11, in <module>
from mssqlcli.config import config_location
ImportError: cannot import name 'config_location'
I fixed it with:
$ pip3 uninstall mssql-cli mssqlcli
$ pip3 install mssql-cli
then editing the last line of $(which mssql-cli) to change python to python3
mssql-cli is now working.