EyeWitness icon indicating copy to clipboard operation
EyeWitness copied to clipboard

pip install failing in Kali

Open digininja opened this issue 1 year ago • 3 comments

OS Used - ALL Information (architecture, linux flavor, etc.)

Latest Kali

We moved away from using pip to install the Python modules because they weren't being installed correctly due to conflicts with other libraries installed by apt. The latest update to the setup script has gone back to pip which is now failing on the latest Kali.

This is what I get if I run the install script on its own:

┌──(robin㉿RT-KALI-RW)-[~/tools/EyeWitness/Python/setup]
└─$ sudo python3 -m pip install -r requirements.txt
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

I managed to install all the modules except Selenium using apt but apt wants to install the latest Selenium and gives version 4.24.4 rather than 4.9.1 which doesn't work.

For now, I've got it working using a virtual environment:

sudo apt install python3.12-venv
python3 -m venv ~/tools/venv
~/tools/venv/bin/pip install -r setup/requirements.txt 
~/tools/venv/bin/python EyeWitness.py 
 ~/tools/venv/bin/python EyeWitness.py -x ~/file.xml -d ~/eyew1

I don't know how easy it would be to get this setup through the setup script but it might be worth a try.

digininja avatar Dec 09 '24 12:12 digininja

This fix worked for me as well. Does anyone know if pip has an option to for an apt install of the relevant apt package?

KyleDev008 avatar Mar 13 '25 18:03 KyleDev008

Cannot find python3.12-venv on Debian...

Wh1t3Rabyt3 avatar Mar 17 '25 09:03 Wh1t3Rabyt3

use whatever version debian currently has instead of 3.12

digininja avatar Mar 17 '25 09:03 digininja

Related: #636

For as long as I've been using/working on EyeWitness, the installer has been using regular pip. However, it may be (past) time for a solid attempt at switching to using virtual environments.

I will try to look at this at some point.

0x6d6f7468 avatar Sep 23 '25 23:09 0x6d6f7468

However, it may be (past) time for a solid attempt at switching to using virtual environments.

Yes, please 👍 The best option would be to make the Python part of EyeWitness installable as a Python package. Therefor, a pyproject.toml file is needed, which then incorporates the dependencies from requirements.txt. Users can then simply install EyeWitness via pip (manually inside a venv) or via tools like pipx which handle the venv automatically.

Of course, there are non-Python dependencies, like OS packages or the geckodriver binary, but it's perfectly fine (and necessary) that the user handles these outside of the venv. The setup.sh can still assist in this for those who like to run it.

exploide avatar Sep 25 '25 14:09 exploide