Thank you for your reply. I have read all the linked pages inserted in your reply and benefited a lot from them.
However, this does not solve my problem.
As a secondary developer of ArcGIS, ArcPy is a necessary python library, and other third-party Python libraries may also be used, and some libraries are not available in conda (such as python-docx), so I often use pip installation. This is also a habit I inherited from ArcMap.
Since the toolkits I make are often used by other non-developers, I can't just clone the Python environment for my own use. When other people use the toolkit, my tool automatically installs the Python third-party libraries they need.
In both ArcMap and ArcGIS Pro3.0 versions, my tools were able to automatically install and import Python third-party libraries for others when they were running. But to Pro3.3, the situation has changed, the specific change now Python third-party library installed successfully but can not import, resulting in tool failure. Later I found out the reason, which is that as mentioned before, neither Pro3.3 nor Pro3.4 can import Python third-party libraries installed in "\AppData\Roaming\Python\Python311\site-packages", while Pro3.0 can.
I understand what you are saying and do not recommend modifying Pro's default Python environment. I think Pro3.0 is doing a great job, Because it automatically installs Python third-party libraries in "\AppData\Roaming\Python\Python311\site-packages" instead of "C:\Program. Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages" and import smoothly.
While Pro3.3 installs Python third-party libraries in "\AppData\Roaming\Python\Python311\site-packages", but can not import smoothly, the solution is to use administrator permissions for pip installation. But then Python third-party libraries are installed in "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages", This runs counter to Esri's own statement that it "does not recommend modifying Pro's default Python environment."
I can't just clone the Python environment for my own use, because as I said before, the toolkit I make often needs to be used by other non-developers, if my user is using Pro3.3 version, I can only install Python third-party libraries in the Pro3.3 default Python environment.
So I have to think that Pro3.3 has taken a step back in terms of installing Python third-party libraries. This is because it cannot import Python third-party libraries in "\AppData\Roaming\Python\Python311\site-packages", even though this Python third-party library is installed by itself via pip. I even suspect it's a bug.
If my ideas are biased, or if you have a better idea, please do let me know. thank you.