cli icon indicating copy to clipboard operation
cli copied to clipboard

python3 not supported yet

Open ZhangZhida opened this issue 5 years ago • 1 comments

After installation, running leetcode-cli would give the following error.

Traceback (most recent call last): File "/Users//miniconda3/bin/leetcode-cli", line 11, in load_entry_point('leetcode-cli==0.0.6', 'console_scripts', 'leetcode-cli')() File "/Users//miniconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 489, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/Users//miniconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 2852, in load_entry_point return ep.load() File "/Users//miniconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 2443, in load return self.resolve() File "/Users//miniconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 2449, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/Users//miniconda3/lib/python3.7/site-packages/leetcode_cli-0.0.6-py3.7.egg/leetcodecli/cli.py", line 266 print 'Welcome %s!' % username ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print('Welcome %s!' % username)?

ZhangZhida avatar Feb 25 '20 18:02 ZhangZhida

One solution is to use anaconda to create a virtual environment using python version 2.7.

ZhangZhida avatar Feb 25 '20 18:02 ZhangZhida

@ZhangZhida thanks for flagging it. i just upgraded the code to python 3.

blockchainian avatar Nov 08 '22 12:11 blockchainian