terminal-leetcode icon indicating copy to clipboard operation
terminal-leetcode copied to clipboard

installation error and usage error

Open lqlee opened this issue 3 years ago • 0 comments

terminal-leetcode > leetcode -v Traceback (most recent call last): File "/usr/local/bin/leetcode", line 6, in from pkg_resources import load_entry_point File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/init.py", line 3241, in @_call_aside File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/init.py", line 3225, in _call_aside f(*args, **kwargs) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/init.py", line 3254, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/init.py", line 583, in _build_master ws.require(requires) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/init.py", line 900, in require needed = self.resolve(parse_requirements(requirements)) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/init.py", line 786, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'pycookiecheat' distribution was not found and is required by terminal-leetcode

terminal-leetcode > sudo python setup.py install Password: running install running bdist_egg running egg_info creating terminal_leetcode.egg-info writing requirements to terminal_leetcode.egg-info/requires.txt writing terminal_leetcode.egg-info/PKG-INFO writing top-level names to terminal_leetcode.egg-info/top_level.txt writing dependency_links to terminal_leetcode.egg-info/dependency_links.txt writing entry points to terminal_leetcode.egg-info/entry_points.txt writing manifest file 'terminal_leetcode.egg-info/SOURCES.txt' reading manifest file 'terminal_leetcode.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'terminal_leetcode.egg-info/SOURCES.txt' installing library code to build/bdist.macosx-10.15-x86_64/egg running install_lib running build_py creating build creating build/lib creating build/lib/leetcode copying leetcode/terminal.py -> build/lib/leetcode copying leetcode/init.py -> build/lib/leetcode copying leetcode/cli.py -> build/lib/leetcode copying leetcode/main.py -> build/lib/leetcode creating build/lib/leetcode/views copying leetcode/views/loading.py -> build/lib/leetcode/views copying leetcode/views/home.py -> build/lib/leetcode/views copying leetcode/views/viewhelper.py -> build/lib/leetcode/views copying leetcode/views/init.py -> build/lib/leetcode/views copying leetcode/views/result.py -> build/lib/leetcode/views copying leetcode/views/detail.py -> build/lib/leetcode/views copying leetcode/views/help.py -> build/lib/leetcode/views creating build/lib/leetcode/client copying leetcode/client/auth.py -> build/lib/leetcode/client copying leetcode/client/quiz.py -> build/lib/leetcode/client copying leetcode/client/init.py -> build/lib/leetcode/client copying leetcode/client/leetcode.py -> build/lib/leetcode/client copying leetcode/client/process.py -> build/lib/leetcode/client creating build/lib/leetcode/coding copying leetcode/coding/code.py -> build/lib/leetcode/coding copying leetcode/coding/init.py -> build/lib/leetcode/coding copying leetcode/coding/editor.py -> build/lib/leetcode/coding creating build/lib/leetcode/helper copying leetcode/helper/trace.py -> build/lib/leetcode/helper copying leetcode/helper/config.py -> build/lib/leetcode/helper copying leetcode/helper/log.py -> build/lib/leetcode/helper copying leetcode/helper/init.py -> build/lib/leetcode/helper copying leetcode/helper/model.py -> build/lib/leetcode/helper copying leetcode/helper/common.py -> build/lib/leetcode/helper creating build/bdist.macosx-10.15-x86_64 creating build/bdist.macosx-10.15-x86_64/egg creating build/bdist.macosx-10.15-x86_64/egg/leetcode copying build/lib/leetcode/terminal.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode copying build/lib/leetcode/init.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode copying build/lib/leetcode/cli.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode creating build/bdist.macosx-10.15-x86_64/egg/leetcode/coding copying build/lib/leetcode/coding/code.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/coding copying build/lib/leetcode/coding/init.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/coding copying build/lib/leetcode/coding/editor.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/coding creating build/bdist.macosx-10.15-x86_64/egg/leetcode/views copying build/lib/leetcode/views/loading.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/views copying build/lib/leetcode/views/home.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/views copying build/lib/leetcode/views/viewhelper.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/views copying build/lib/leetcode/views/init.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/views copying build/lib/leetcode/views/result.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/views copying build/lib/leetcode/views/detail.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/views copying build/lib/leetcode/views/help.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/views creating build/bdist.macosx-10.15-x86_64/egg/leetcode/helper copying build/lib/leetcode/helper/trace.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/helper copying build/lib/leetcode/helper/config.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/helper copying build/lib/leetcode/helper/log.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/helper copying build/lib/leetcode/helper/init.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/helper copying build/lib/leetcode/helper/model.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/helper copying build/lib/leetcode/helper/common.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/helper creating build/bdist.macosx-10.15-x86_64/egg/leetcode/client copying build/lib/leetcode/client/auth.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/client copying build/lib/leetcode/client/quiz.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/client copying build/lib/leetcode/client/init.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/client copying build/lib/leetcode/client/leetcode.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/client copying build/lib/leetcode/client/process.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode/client copying build/lib/leetcode/main.py -> build/bdist.macosx-10.15-x86_64/egg/leetcode byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/terminal.py to terminal.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/init.py to init.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/cli.py to cli.pyc File "build/bdist.macosx-10.15-x86_64/egg/leetcode/cli.py", line 32 print('\033[91m' + f"sub-command "{args.command}" is not supported!\n" + '\033[0m') ^ SyntaxError: invalid syntax

byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/coding/code.py to code.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/coding/init.py to init.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/coding/editor.py to editor.pyc File "build/bdist.macosx-10.15-x86_64/egg/leetcode/coding/editor.py", line 8 def edit(filepath: Path, loop): ^ SyntaxError: invalid syntax

byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/views/loading.py to loading.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/views/home.py to home.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/views/viewhelper.py to viewhelper.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/views/init.py to init.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/views/result.py to result.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/views/detail.py to detail.pyc File "build/bdist.macosx-10.15-x86_64/egg/leetcode/views/detail.py", line 71 return f"{BASE_URL}/problems/{self.quiz.slug}/discuss" ^ SyntaxError: invalid syntax

byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/views/help.py to help.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/helper/trace.py to trace.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/helper/config.py to config.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/helper/log.py to log.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/helper/init.py to init.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/helper/model.py to model.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/helper/common.py to common.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/client/auth.py to auth.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/client/quiz.py to quiz.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/client/init.py to init.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/client/leetcode.py to leetcode.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/client/process.py to process.pyc byte-compiling build/bdist.macosx-10.15-x86_64/egg/leetcode/main.py to main.pyc creating build/bdist.macosx-10.15-x86_64/egg/EGG-INFO copying terminal_leetcode.egg-info/PKG-INFO -> build/bdist.macosx-10.15-x86_64/egg/EGG-INFO copying terminal_leetcode.egg-info/SOURCES.txt -> build/bdist.macosx-10.15-x86_64/egg/EGG-INFO copying terminal_leetcode.egg-info/dependency_links.txt -> build/bdist.macosx-10.15-x86_64/egg/EGG-INFO copying terminal_leetcode.egg-info/entry_points.txt -> build/bdist.macosx-10.15-x86_64/egg/EGG-INFO copying terminal_leetcode.egg-info/requires.txt -> build/bdist.macosx-10.15-x86_64/egg/EGG-INFO copying terminal_leetcode.egg-info/top_level.txt -> build/bdist.macosx-10.15-x86_64/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... creating dist creating 'dist/terminal_leetcode-0.0.20-py2.7.egg' and adding 'build/bdist.macosx-10.15-x86_64/egg' to it removing 'build/bdist.macosx-10.15-x86_64/egg' (and everything under it) Processing terminal_leetcode-0.0.20-py2.7.egg Copying terminal_leetcode-0.0.20-py2.7.egg to /Library/Python/2.7/site-packages Adding terminal-leetcode 0.0.20 to easy-install.pth file Installing leetcode script to /usr/local/bin

Installed /Library/Python/2.7/site-packages/terminal_leetcode-0.0.20-py2.7.egg Processing dependencies for terminal-leetcode==0.0.20 Searching for pycookiecheat Reading https://pypi.org/simple/pycookiecheat/ Downloading https://files.pythonhosted.org/packages/f8/f0/dc3b51b5aeb5a3d18e3429ab66fa93173ed957d9b3de98ef77aa8ebc455e/pycookiecheat-0.4.7.tar.gz#sha256=bcc810c2266c4924d61080e0f5a73f7ed09c43b2dde2d022343dc567391bf913 Best match: pycookiecheat 0.4.7 Processing pycookiecheat-0.4.7.tar.gz error: Couldn't find a setup script in /tmp/easy_install-z6Stg2/pycookiecheat-0.4.7.tar.gz

~ > pip3 install terminal-leetcode --user Collecting terminal-leetcode Collecting requests (from terminal-leetcode) Using cached https://files.pythonhosted.org/packages/2d/61/08076519c80041bc0ffa1a8af0cbd3bf3e2b62af10435d269a9d0f40564d/requests-2.27.1-py2.py3-none-any.whl Collecting decorator (from terminal-leetcode) Using cached https://files.pythonhosted.org/packages/d5/50/83c593b07763e1161326b3b8c6686f0f4b0f24d5526546bee538c89837d6/decorator-5.1.1-py3-none-any.whl Collecting pycookiecheat (from terminal-leetcode) Using cached https://files.pythonhosted.org/packages/84/62/f15b1e76975e1fa9e1499449c5d362cf5e4eebc47af522a50bedf82bc72f/pycookiecheat-0.4.7-py3-none-any.whl Collecting lxml (from terminal-leetcode) Using cached https://files.pythonhosted.org/packages/37/dc/3caef6f01cda107bc46bc29feb43fbf959a1044a74a0c0f64c0fedd38dce/lxml-4.9.0-cp38-cp38-macosx_10_15_x86_64.whl Collecting urwid (from terminal-leetcode) Collecting bs4 (from terminal-leetcode) Collecting urllib3<1.27,>=1.21.1 (from requests->terminal-leetcode) Using cached https://files.pythonhosted.org/packages/ec/03/062e6444ce4baf1eac17a6a0ebfe36bb1ad05e1df0e20b110de59c278498/urllib3-1.26.9-py2.py3-none-any.whl Collecting certifi>=2017.4.17 (from requests->terminal-leetcode) Using cached https://files.pythonhosted.org/packages/11/dd/e015f3780f42dd9af62cf0107b44ea1298926627ecd70c17b0e484e95bcd/certifi-2022.5.18.1-py3-none-any.whl Collecting charset-normalizer~=2.0.0; python_version >= "3" (from requests->terminal-leetcode) Using cached https://files.pythonhosted.org/packages/06/b3/24afc8868eba069a7f03650ac750a778862dc34941a4bebeb58706715726/charset_normalizer-2.0.12-py3-none-any.whl Collecting idna<4,>=2.5; python_version >= "3" (from requests->terminal-leetcode) Using cached https://files.pythonhosted.org/packages/04/a2/d918dcd22354d8958fe113e1a3630137e0fc8b44859ade3063982eacd2a4/idna-3.3-py3-none-any.whl Collecting cryptography==3.4.6 (from pycookiecheat->terminal-leetcode) Using cached https://files.pythonhosted.org/packages/32/52/4ba2bdec39b51a072a968c2b425c3649777d4816d27832703e082e2c5534/cryptography-3.4.6-cp36-abi3-macosx_10_10_x86_64.whl Collecting keyring==23.0.0 (from pycookiecheat->terminal-leetcode) Using cached https://files.pythonhosted.org/packages/4a/4f/a63f284d26eac29a29e24657d12f17bddac58b12673ca39b53ae5f20c1a3/keyring-23.0.0-py3-none-any.whl Collecting beautifulsoup4 (from bs4->terminal-leetcode) Using cached https://files.pythonhosted.org/packages/9c/d8/909c4089dbe4ade9f9705f143c9f13f065049a9d5e7d34c828aefdd0a97c/beautifulsoup4-4.11.1-py3-none-any.whl Collecting cffi>=1.12 (from cryptography==3.4.6->pycookiecheat->terminal-leetcode) Using cached https://files.pythonhosted.org/packages/5e/f0/693b6c7fea52d1afad55d1bfa3e5991a9075d98ac66330ab404dbc69ec8d/cffi-1.15.0-cp38-cp38-macosx_10_9_x86_64.whl Collecting importlib-metadata>=3.6 (from keyring==23.0.0->pycookiecheat->terminal-leetcode) Using cached https://files.pythonhosted.org/packages/ab/b5/1bd220dd470b0b912fc31499e0d9c652007a60caf137995867ccc4b98cb6/importlib_metadata-4.11.4-py3-none-any.whl Collecting soupsieve>1.2 (from beautifulsoup4->bs4->terminal-leetcode) Using cached https://files.pythonhosted.org/packages/16/e3/4ad79882b92617e3a4a0df1960d6bce08edfb637737ac5c3f3ba29022e25/soupsieve-2.3.2.post1-py3-none-any.whl Collecting pycparser (from cffi>=1.12->cryptography==3.4.6->pycookiecheat->terminal-leetcode) Using cached https://files.pythonhosted.org/packages/62/d5/5f610ebe421e85889f2e55e33b7f9a6795bd982198517d912eb1c76e1a53/pycparser-2.21-py2.py3-none-any.whl Collecting zipp>=0.5 (from importlib-metadata>=3.6->keyring==23.0.0->pycookiecheat->terminal-leetcode) Using cached https://files.pythonhosted.org/packages/80/0e/16a7ee38617aab6a624e95948d314097cc2669edae9b02ded53309941cfc/zipp-3.8.0-py3-none-any.whl Installing collected packages: urllib3, certifi, charset-normalizer, idna, requests, decorator, pycparser, cffi, cryptography, zipp, importlib-metadata, keyring, pycookiecheat, lxml, urwid, soupsieve, beautifulsoup4, bs4, terminal-leetcode WARNING: The script normalizer is installed in '/Users/aa/Library/Python/3.8/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script keyring is installed in '/Users/aa/Library/Python/3.8/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script leetcode is installed in '/Users/aa/Library/Python/3.8/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed beautifulsoup4-4.11.1 bs4-0.0.1 certifi-2022.5.18.1 cffi-1.15.0 charset-normalizer-2.0.12 cryptography-3.4.6 decorator-5.1.1 idna-3.3 importlib-metadata-4.11.4 keyring-23.0.0 lxml-4.9.0 pycookiecheat-0.4.7 pycparser-2.21 requests-2.27.1 soupsieve-2.3.2.post1 terminal-leetcode-0.0.19 urllib3-1.26.9 urwid-2.1.2 zipp-3.8.0 WARNING: You are using pip version 19.2.3, however version 22.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command.

~ > pip3 install urwid Requirement already satisfied: urwid in ./Library/Python/3.8/lib/python/site-packages (2.1.2)

~ > pip3 install pycookiecheat Requirement already satisfied: pycookiecheat in ./Library/Python/3.8/lib/python/site-packages (0.4.7) Requirement already satisfied: keyring==23.0.0 in ./Library/Python/3.8/lib/python/site-packages (from pycookiecheat) (23.0.0) Requirement already satisfied: cryptography==3.4.6 in ./Library/Python/3.8/lib/python/site-packages (from pycookiecheat) (3.4.6) Requirement already satisfied: importlib-metadata>=3.6 in ./Library/Python/3.8/lib/python/site-packages (from keyring==23.0.0->pycookiecheat) (4.11.4) Requirement already satisfied: cffi>=1.12 in ./Library/Python/3.8/lib/python/site-packages (from cryptography==3.4.6->pycookiecheat) (1.15.0) Requirement already satisfied: zipp>=0.5 in ./Library/Python/3.8/lib/python/site-packages (from importlib-metadata>=3.6->keyring==23.0.0->pycookiecheat) (3.8.0) Requirement already satisfied: pycparser in ./Library/Python/3.8/lib/python/site-packages (from cffi>=1.12->cryptography==3.4.6->pycookiecheat) (2.21)

lqlee avatar Jun 01 '22 22:06 lqlee