Above 5.4.3, Spyder launch stuck when loading Pythonpath manager
### Issue Report Checklist

* [x] Searched the [issues page](https://github.com/spyder-ide/spyder/issues?q=is%3Aissue) for similar reports
* [x] Read the relevant sections of the [Spyder Troubleshooting Guide](https://github.com/spyder-ide/spyder/wiki/Troubleshooting-Guide-and-FAQ) and followed its advice
* [x] Reproduced the issue after updating with ``conda update spyder`` (or ``pip``, if not using Anaconda)
* [ ] Could not reproduce inside ``jupyter qtconsole`` (if console-related)
* [x] Tried basic troubleshooting (if a bug/error)
    * [x] Restarted Spyder
    * [x] Reset preferences with ``spyder --reset``
    * [x] Reinstalled the latest version of [Anaconda](https://www.anaconda.com/download/)
    * [x] Tried the other applicable steps from the Troubleshooting Guide
* [x] Completed the **Problem Description**, **Steps to Reproduce** and **Version** sections below


## Problem Description

I have been running Spyder for many years. It works perfectly with 5.4.2, when updating to 5.4.3 or 5.4.4, launch gets stuck on "Launching code analysis"

### What steps reproduce the problem?

1. Launch Spyder >5.4.3
2. It gets stuck 

Personal note: I have been installing the last version of Spyder on Ubuntu 22.04.2 LTS through Anaconda on the laptops of my students, it works.

### What is the expected output? What do you see instead?

I would expected Spyder to launch, it gets stuck.

### Paste Traceback/Error Below (if applicable)

[spyder-debug.log](https://github.com/spyder-ide/spyder/files/12136318/spyder-debug.log)

## Versions
<!--- You can get this information from Help > About Spyder...
or (if Spyder won't launch) the "conda list" command
from the Anaconda Prompt/Terminal/command line. --->

* Spyder version: > 5.4.3
* Python version:  3.11.4
* Qt version: 5.15.8
* PyQt version: 5.15.7
* Operating System name/version: Ubuntu 22.04.2 LTS

### Dependencies

I cannot access the Menu since Spyder does not launch. Here is the conda environment I created to perform the final test (mamba create -n spyder-env python=3 spyder)

[mamba_env.txt](https://github.com/spyder-ide/spyder/files/12136317/mamba_env.txt)

For the Devs who are going to check this, thanks a lot for all your work. I really enjoy working with Spyder.

diff --git a/spyder/utils/environ.py b/spyder/utils/environ.py
index 546d94953..024085553 100644
--- a/spyder/utils/environ.py
+++ b/spyder/utils/environ.py
@@ -72,7 +72,8 @@ def get_user_environment_variables():
             else:
                 env = {}
             proc = run_shell_command(cmd, env=env, text=True)
-            stdout, stderr = proc.communicate()
+            # Use timeout to fix spyder-ide/spyder#21172
+            stdout, stderr = proc.communicate(timeout=0.5)
             env_var = eval(stdout, None)
     except Exception:
         return {}
['spyder/utils/environ.py']