dbcli / mycli

A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.
http://mycli.net
Other
11.49k stars 663 forks source link

An error occurred when the mycli command was executed #1100

Open pptfz opened 1 year ago

pptfz commented 1 year ago

install

pip3 install mycli

Operating system

$ cat /etc/redhat-release 
CentOS Linux release 7.9.2009 (Core)

command

$ which mycli
/usr/local/bin/mycli

python version

$ python
python                    python2.7                 python3.6                 python3.6m                python3.6m-x86_64-config  
python2                   python3                   python3.6-config          python3.6m-config         python3-config            

Execution error

$ mycli --version
Traceback (most recent call last):
  File "/usr/local/bin/mycli", line 5, in <module>
    from mycli.main import cli
  File "/usr/local/lib/python3.6/site-packages/mycli/main.py", line 27, in <module>
    import sqlglot
  File "/usr/local/lib/python3.6/site-packages/sqlglot/__init__.py", line 5
    from __future__ import annotations
    ^
SyntaxError: future feature annotations is not defined
amagnolo commented 1 year ago

The same problem occurs in Rocky Linux release 8.7, after upgrading mycli to the current version. A workaround is to revert to an older version: pip3 install mycli --upgrade mycli==1.25.0

pptfz commented 1 year ago

The same problem occurs in Rocky Linux release 8.7, after upgrading mycli to the current version. A workaround is to revert to an older version: pip3 install mycli --upgrade mycli==1.25.0

Thank you very much, I am the latest version installed by default and will not work properly in Centoss 7.9, Follow the method you provided to install version 1.25