Skip to content

Externally managed environment issue won't be bypassed #1943

@imonkolina-ctrl

Description

@imonkolina-ctrl

Hi everyone,

I’m having a lot of trouble getting SpiderFoot installed on the latest Kali Linux, and I’d really appreciate some help. I’ve tried both a Kali install in VirtualBox and running it natively on Windows 11, but I keep hitting roadblocks in both avenues. When trying to use both recommended installation commands, I get this:

 × 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.
If you wish to install a non-Kali-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have pypy3-venv installed.
If you wish to install a non-Kali-packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.

For more information, refer to the following:
* https://www.kali.org/docs/general-use/python3-external-packages/
* /usr/share/doc/python3.13/README.venv**

I tried working around it by installing pipx (I’m on version 1.7.1-1) and also by setting up a virtual environment, but that just led me to the next problem.

When I try to install it inside a virtual environment (venv), the process fails while building lxml, saying I need the libxml2 and libxslt development packages installed. See below

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [4 lines of output]
:67: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
Building lxml version 4.9.4.
Building without Cython.
Error: Please make sure the libxml2 and libxslt development packages are installed.
[end of output]**

I tried to install libxml2-dev and libxslt1-dev via apt, but I still get the same error.

The third solution I tried was to force it with --break-system-packages, but then I end up with a mess of dependency conflicts, so that doesn’t seem like a clean solution.

Any advice would be hugely appreciated—thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions