LFISuite icon indicating copy to clipboard operation
LFISuite copied to clipboard

termcolor issue in pip

Open ShadowBeast235 opened this issue 4 years ago • 5 comments

┌──(kali㉿kali)-[~/LFISuite] └─$ python lfisuite.py
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Defaulting to user installation because normal site-packages is not writeable Requirement already up-to-date: pip in /home/kali/.local/lib/python2.7/site-packages (20.2.4)

[*] Installing module 'termcolor' DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Defaulting to user installation because normal site-packages is not writeable Collecting termcolor Using cached termcolor-1.1.0.tar.gz (3.9 kB) ERROR: Command errored out with exit status 1: command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3gNR89/termcolor/setup.py'"'"'; file='"'"'/tmp/pip-install-3gNR89/termcolor/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-sSDHVv cwd: /tmp/pip-install-3gNR89/termcolor/ Complete output (6 lines): usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help

error: invalid command 'egg_info'
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. Traceback (most recent call last): File "lfisuite.py", line 68, in from termcolor import colored ImportError: No module named termcolor

┌──(kali㉿kali)-[~/LFISuite] └─$

ShadowBeast235 avatar Nov 30 '20 10:11 ShadowBeast235

ShadowHacker hello try

cd /usr/lib/python2.7/ sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py sudo python get-pip.py sudo pip install requests sudo pip install termcolor

ShadowHackrs avatar Dec 20 '20 16:12 ShadowHackrs

I did as stated above, but still got the same error at the end.

┌──(root💀kali)-[/usr/lib/python2.7] └─# pip install termcolor DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting termcolor Using cached termcolor-1.1.0.tar.gz (3.9 kB) ERROR: Command errored out with exit status 1: command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mMxWt8/termcolor/setup.py'"'"'; file='"'"'/tmp/pip-install-mMxWt8/termcolor/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-mwdl6p cwd: /tmp/pip-install-mMxWt8/termcolor/ Complete output (6 lines): usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help

error: invalid command 'egg_info'
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

ndsecc avatar Dec 24 '20 18:12 ndsecc

I have the same situation. Up please

cd /usr/lib/python2.7/ sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py sudo python get-pip.py sudo pip install requests sudo pip install termcolor

I've done it. And I have this mistake

error: invalid command 'egg_info'

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

fantomcheg avatar Jan 20 '21 07:01 fantomcheg

I did as stated above, but still got the same error at the end.

┌──(root💀kali)-[/usr/lib/python2.7] └─# pip install termcolor DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Collecting termcolor Using cached termcolor-1.1.0.tar.gz (3.9 kB) ERROR: Command errored out with exit status 1: command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mMxWt8/termcolor/setup.py'"'"'; file='"'"'/tmp/pip-install-mMxWt8/termcolor/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-mwdl6p cwd: /tmp/pip-install-mMxWt8/termcolor/ Complete output (6 lines): usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help

error: invalid command 'egg_info'
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

You are getting these errors because you are using Python v2.7 which was deprecated as of January 1st, 2020.

Solution: *). Switch Python Version In Kali/Debian to v3.x.x using sudo update-alternatives --config python, then select the appropriate number with Python v3.x.x.

But if you do not have Python v3 installed on your system, then you should install the latest version of Python

Also; After following the above instructions, and while running sudo python lfisuite.py within the Lfisuite to start the application, Lfisuite would auto-install all needed dependencies.

But; *). In a situation where Lfisuite isn't able to install termcolor into Python 2.x.x location in /usr/lib/python2.x.x/dist-packages/, but you have termcolor installed into Python 3.x.x location at /usr/lib/python3.x.x/dist-packages/.

*). Copy the termcolor.py & termcolor.pyc from /usr/lib/python3.x.x/dist-packages/ to /usr/lib/python2.x.x/dist-packages/ because termcolor would not accept deprecated Python 2.x.x as at 2021.

NOTE: Lfisuite v1.13 only works on Python 2.7. Therefore to run Lfisuite you need to change your python version to v2.x.x using sudo update-alternatives --config python

Sidodus avatar Feb 22 '21 12:02 Sidodus

I did as stated above, but still got the same error at the end. ┌──(rootskullkali)-[/usr/lib/python2.7] └─# pip install termcolor DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Collecting termcolor Using cached termcolor-1.1.0.tar.gz (3.9 kB) ERROR: Command errored out with exit status 1: command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mMxWt8/termcolor/setup.py'"'"'; file='"'"'/tmp/pip-install-mMxWt8/termcolor/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-mwdl6p cwd: /tmp/pip-install-mMxWt8/termcolor/ Complete output (6 lines): usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help

error: invalid command 'egg_info'
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

You are getting these errors because you are using Python v2.7 which was deprecated as of January 1st, 2020.

Solution: *). Switch Python Version In Kali/Debian to v3.x.x using sudo update-alternatives --config python, then select the appropriate number with Python v3.x.x.

But if you do not have Python v3 installed on your system, then you should install the latest version of Python

Also; After following the above instructions, and while running sudo python lfisuite.py within the Lfisuite to start the application, Lfisuite would auto-install all needed dependencies.

But; *). In a situation where Lfisuite isn't able to install termcolor into Python 2.x.x location in /usr/lib/python2.x.x/dist-packages/, but you have termcolor installed into Python 3.x.x location at /usr/lib/python3.x.x/dist-packages/.

*). Copy the termcolor.py & termcolor.pyc from /usr/lib/python3.x.x/dist-packages/ to /usr/lib/python2.x.x/dist-packages/ because termcolor would not accept deprecated Python 2.x.x as at 2021.

NOTE: Lfisuite v1.13 only works on Python 2.7. Therefore to run Lfisuite you need to change your python version to v2.x.x using sudo update-alternatives --config python

thank you the last one worked for me.

sudouday avatar Apr 23 '21 06:04 sudouday