Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

termcolor issue in pip #24

Open
ShadowBeast235 opened this issue Nov 30, 2020 · 5 comments
Open

termcolor issue in pip #24

ShadowBeast235 opened this issue Nov 30, 2020 · 5 comments

Comments

@ShadowBeast235
Copy link

┌──(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]
└─$

@ShadowHackrs
Copy link

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

@ndsecc
Copy link

ndsecc commented Dec 24, 2020

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.

@fantomcheg
Copy link

fantomcheg commented Jan 20, 2021

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.

@Sidodus
Copy link

Sidodus commented Feb 22, 2021

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

@sudouday
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants