Skip to content

Commit 52b5ed6

Browse files
authored
Merge pull request #74 from ThePorgs/dev
Adding PEP668 troubleshooting guide
2 parents ee3ab6a + 6d84932 commit 52b5ed6

File tree

2 files changed

+87
-2
lines changed

2 files changed

+87
-2
lines changed

source/community/contributors.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ The pipeline may raise some issues, but if they're not related to your tool (e.g
304304

305305
Once everything works, the pull request will be merged, the pipeline will run again in order to test, build and publish a new ``nightly`` image. Congrats, you're now an Exegol contributor!
306306

307-
Temporary fixing a tool
308-
~~~~~~~~~~~~~~~~~~~~~~~
307+
Temporary fixing a tool (a.k.a. tempfix)
308+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
309309

310310
Tools sometimes have their own issues along their development. A temporary fix can be added as follows, in order to let builds pass successfully, while the respective tool is not fixed. The fix depends on the way the tool is supposed to be installed.
311311

source/getting-started/troubleshooting.rst

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,88 @@ To correct this problem, simply disable this feature on the Exegol repository an
121121
git rm -rf --cached .
122122
git reset --hard HEAD
123123
124+
How to fix the error ``This environment is externally managed``
125+
===============================================================
126+
When installing exegol with ``python3 -m pip install exegol`` on modern operating systems (Ubuntu 23.04 and higher, Debian 12 and higher, macOS 14+), you may encounter the following error:
127+
128+
.. code-block::
129+
130+
This environment is externally managed
131+
To install Python packages system-wide, try apt install
132+
python3-xyz, where xyz is the package you are trying to
133+
install.
134+
135+
If you wish to install a non-Debian-packaged Python package,
136+
create a virtual environment using python3 -m venv path/to/venv.
137+
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
138+
sure you have python3-full installed.
139+
140+
If you wish to install a non-Debian packaged Python application,
141+
it may be easiest to use pipx install xyz, which will manage a
142+
virtual environment for you. Make sure you have pipx installed.
143+
144+
See /usr/share/doc/python3.11/README.venv for more information.
145+
146+
hint: See PEP 668 for the detailed specification.
147+
148+
As the error message suggests, this error occurs when you try to install Python packages system-wide.
149+
To resolve this issue, you have two options :
150+
151+
.. tabs::
152+
153+
.. tab:: Recommended Methods
154+
155+
**Using pipx (Preferred)**
156+
157+
The recommended way to install Exegol is using ``pipx``, which automatically handles virtual environment creation:
158+
159+
.. code-block:: bash
160+
161+
pipx install exegol
162+
163+
**Manual Virtual Environment**
164+
165+
Alternatively, you can create and manage a virtual environment manually:
166+
167+
.. code-block:: bash
168+
169+
python3 -m venv path/to/venv
170+
source path/to/venv/bin/activate
171+
python3 -m pip install exegol
172+
173+
.. tab:: Other Methods
174+
175+
.. warning::
176+
177+
The following methods are not recommended as they can lead to conflicts with system packages.
178+
179+
**User Site Installation**
180+
181+
Install in the user site directory:
182+
183+
.. code-block:: bash
184+
185+
python3 -m pip install --user exegol
186+
187+
**System-wide Installation**
188+
189+
Override system restrictions (not recommended):
190+
191+
.. code-block:: bash
192+
193+
python3 -m pip install exegol --break-system-site-packages
194+
195+
Arsenal needs TIOCSTI enable for running
196+
========================================
197+
198+
The arsenal tool needs the ``TIOCSTI`` functionality enabled. A GitHub exit exists to request an evolution: https://github.com/Orange-Cyberdefense/arsenal/issues/77.
199+
200+
This feature cannot be enabled only in exegol containers (docker limitation), it must be configured in the host with the following command:
201+
202+
.. code-block::
203+
204+
# For the current session
205+
sudo sysctl -w dev.tty.legacy_tiocsti=1
206+
207+
# Persistent configuration (as root)
208+
echo "dev.tty.legacy_tiocsti=1" >> /etc/sysctl.conf

0 commit comments

Comments
 (0)