Unexpected Python Paths in Conda Environment
Problem Statement:
In a Conda environment, the unexpected order of directories in the Python path leads to the prioritization of packages installed in non-Conda local paths over those installed in the Conda environment.
Explanation:
This behavior is documented in PEP 370. The site module appends the user site to the sys.path before appending the prefix site. This prioritization allows users to prioritize packages installed at the user level over those installed at the system level.
Options for Avoidance:
To avoid this prioritization, several options are available:
Automated Conda Environment Variable:
The above is the detailed content of Why Does My Conda Environment Prioritize Locally Installed Packages Over Environment Packages?. For more information, please follow other related articles on the PHP Chinese website!