Repository: scikit-learn/scikit-learn
Pull request: DOC: add note about restarting conda environment after creation
#### Reference Issues/PRs

Fixes #27356

#### What does this implement/fix? Explain your changes.

Adds an explanatory notes section that the conda environment after creation needs to be deactivated and reactivated before environment variables become active. It is the same notes section as for the macOS conda build. The change in the rendered docs look like this:

![image](https://github.com/scikit-learn/scikit-learn/assets/40656107/b0f87755-5c92-489f-b852-f4ae796aaed9)

This is my first scikit learn PR. Apologies if the CI skipping strategy is not the correct one.

Problem statement:
Building from source fails using conda instructions
### Describe the bug

I am trying to build the development version of scikit-learn in Windows Subsystem for Linux running Ubuntu 20.04.5 and conda 23.7.2.

After creating the environment, building scikit-learn fails as cython is not found for some reason.

### Steps/Code to Reproduce

```shell
conda create -n sklearn-dev -c conda-forge python numpy scipy cython joblib threadpoolctl pytest compilers
conda activate sklearn-dev
pip install -v --no-use-pep517 --no-build-isolation -e .
``` 


### Expected Results

A succesful build.

### Actual Results

`ModuleNotFoundError: Please install Cython with a version >= 0.29.33 in order to build a scikit-learn from source.`

### Versions

```shell
Ubuntu 20.04.5 LTS
conda 23.7.2
```

Hints from issue discussion:
Could you close and reopen a terminal between the step 1 and step 2. Since `compilers` will modify some environment variables, it can happen that those don't take effect.

I tried on my linux machine and the above command are working as expected.
Thank you @glemaitre , that worked. Is this worth being noted in the docs? Another minor issue I faced before was that the dependencies could not be resolved using a 2 years old conda installation (conda 4.x).
Indeed, we could mention. I know it was the case in MacOS in some cases. Regarding the 2 years old conda, I would say that we cannot track so much those. We always put ourselves in a fresh install. But I am not surprise that the compilers package could not be found.
> Indeed, we could mention. I know it was the case in MacOS in some cases. Regarding the 2 years old conda, I would say that we cannot track so much those. We always put ourselves in a fresh install. But I am not surprise that the compilers package could not be found.

Allright, will try that out as my first contribution. :)

Commit message: add accidentally deleted freebsd header

Patch to review:
diff --git a/doc/developers/advanced_installation.rst b/doc/developers/advanced_installation.rst
index a9461e965af2a..bfcbd1649d56f 100644
--- a/doc/developers/advanced_installation.rst
+++ b/doc/developers/advanced_installation.rst
@@ -69,6 +69,12 @@ feature, code or documentation improvement).
    .. prompt:: bash $
 
      conda create -n sklearn-env -c conda-forge python=3.9 numpy scipy cython
+
+   It is not always necessary but it is safer to open a new prompt before
+   activating the newly created conda environment.
+
+   .. prompt:: bash $
+
      conda activate sklearn-env
 
 #. **Alternative to conda:** If you run Linux or similar, you can instead use
@@ -286,7 +292,13 @@ scikit-learn from source:
 .. prompt:: bash $
 
     conda create -n sklearn-dev -c conda-forge python numpy scipy cython \
-        joblib threadpoolctl pytest compilers llvm-openmp
+        joblib threadpoolctl pytest compilers
+
+It is not always necessary but it is safer to open a new prompt before
+activating the newly created conda environment.
+
+.. prompt:: bash $
+
     conda activate sklearn-dev
     make clean
     pip install -v --no-use-pep517 --no-build-isolation -e .
@@ -307,12 +319,6 @@ forge using the following command:
 
 which should include ``compilers`` and ``llvm-openmp``.
 
-.. note::
-
-   If you installed these packages after creating and activating a new conda
-   environment, you will need to first deactivate and then reactivate the
-   environment for these changes to take effect.
-
 The compilers meta-package will automatically set custom environment
 variables:
 
@@ -428,6 +434,12 @@ in the user folder using conda:
 
     conda create -n sklearn-dev -c conda-forge python numpy scipy cython \
         joblib threadpoolctl pytest compilers
+
+It is not always necessary but it is safer to open a new prompt before
+activating the newly created conda environment.
+
+.. prompt:: bash $
+
     conda activate sklearn-dev
     pip install -v --no-use-pep517 --no-build-isolation -e .
 


Code review comments:
diff_hunk: @@ -286,7 +292,13 @@ scikit-learn from source:
 .. prompt:: bash $
 
     conda create -n sklearn-dev -c conda-forge python numpy scipy cython \
-        joblib threadpoolctl pytest compilers llvm-openmp
+        joblib threadpoolctl pytest compilers
path: doc/developers/advanced_installation.rst
text: @user1:
is there a reason to remove `llvm-openmp`