Repository navigation
Problem installing in kali #113
Description
I tried to install in burp first and when that failed, I decided just to install and use the cli version instead but got many errors:
`(root㉿kali)-[~/tplmap]
└─# pip install -r requirements.txt
Collecting PyYAML==5.1.2
Downloading PyYAML-5.1.2.tar.gz (265 kB)
━━━━━━━━━━━━━━━━━━━━ 265.0/265.0 kB 9.4 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Collecting certifi==2018.10.15
Downloading certifi-2018.10.15-py2.py3-none-any.whl (146 kB)
━━━━━━━━━━━━━━━━━━━ 146.3/146.3 kB 25.3 MB/s eta 0:00:00
Requirement already satisfied: chardet==3.0.4 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 3)) (3.0.4)
Requirement already satisfied: idna==2.8 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 4)) (2.8)
Collecting requests==2.22.0
Downloading requests-2.22.0-py2.py3-none-any.whl (57 kB)
━━━━━━━━━━━━━━━━━━━━━ 58.0/58.0 kB 10.5 MB/s eta 0:00:00
Collecting urllib3==1.24.1
Downloading urllib3-1.24.1-py2.py3-none-any.whl (118 kB)
━━━━━━━━━━━━━━━━━━━ 118.1/118.1 kB 18.9 MB/s eta 0:00:00
Collecting wsgiref==0.1.2
Downloading wsgiref-0.1.2.zip (37 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-lctvd9e0/wsgiref_d7010dd76a9d41859824def11078dadd/setup.py", line 5, in
import ez_setup
File "/tmp/pip-install-lctvd9e0/wsgiref_d7010dd76a9d41859824def11078dadd/ez_setup/init.py", line 170
print "Setuptools version",version,"or greater has been installed."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
`
Activity
AbrahamCain commentedon Mar 7, 2023
Hello @JPwnage, I'm also getting these install errors in Kali. I wonder if setup.py was originally written in Python 2 as Python 2 didn't require print statements to use parenthesis, but Python 3 does and the error that you and I are getting is saying that the print statement is missing parenthesis. I was seeing the issue attempting to install on a box with Python 3.11.1 installed.
AbrahamCain commentedon Mar 7, 2023
https://pypi.org/project/wsgiref/
I wonder if this would be a problem too? It looks like wsgiref 0.1.2 is only compatible with python 3.6 or less. Although, I think python 3.11 has a wsgiref utility built-in per the following python3 documentation:
https://docs.python.org/3/library/wsgiref.html#module-wsgiref
JPwnage commentedon Mar 11, 2023
Hi the reason why we are encountering problems is because the is python 2 and kali has python 3 and the code isn't compatible with python 3.
Solution is to setup a python 2.7 environment
JPwnage commentedon Mar 11, 2023
run these commands
JPwnage commentedon Mar 11, 2023
After that use these commands to start your environment after install.
I actually put it in a script and for easy setup
AbrahamCain commentedon Mar 11, 2023
Hi JPwnage. Thanks for giving me a lesson in Python2 virtual environments :D
masalepri98 commentedon Mar 15, 2023
I get the following when trying to run the virtualenv piece:
Exception: Wheel for wheel for Python 2.7 is unavailable. apt install python2-wheel-whlapt can't locate the python2-wheel-whl app, and Googling isn't getting me anywhere.
lNwNl commentedon May 24, 2023
I fixed some problems, maybe this helps you. https://github.com/qNwNp/tplmap