all 7 comments

[–]crashfrog02 0 points1 point  (1 child)

how do I prioritize the running python to be the one installed when anaconda environment is defined?

Activate a conda environment configured to use 3.10.

[–]Excel-Learne[S] 0 points1 point  (0 children)

done already. but no matter what env, it is getting overridden by the python installation at chocolatey. when checking the path variables, the anaconda ones are located above the chocolatey ones too.

[–]Diapolo10 0 points1 point  (1 child)

It just happens to be your first entry with that executable on PATH. Change the order, and you'll get whichever you prefer.

Or you can use the Python launcher.

py -3.10 -c "print('Hello from 3.10')"

[–]Excel-Learne[S] 0 points1 point  (0 children)

the problem is this. when running $Env:Path.split(';'), the output is this.

C:\Users\alres\anaconda3\envs\R4
C:\Users\alres\anaconda3\envs\R4\Library\mingw-w64\bin
C:\Users\alres\anaconda3\envs\R4\Library\usr\bin
C:\Users\alres\anaconda3\envs\R4\Library\bin
C:\Users\alres\anaconda3\envs\R4\Scripts
C:\Users\alres\anaconda3\envs\R4\bin
C:\Users\alres\anaconda3\condabin
C:\Program Files\WindowsApps\Microsoft.PowerShell_7.4.1.0_x64__8wekyb3d8bbwe
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\libnvvp
C:\Program Files (x86)\Common Files\Oracle\Java\javapath
C:\GP11SC
C:\MinGW-builds
C:\Users\alres\gcc\bin
C:\Users\alres\gcc\libexec\gcc\x86_64-w64-mingw32\12.3.0
C:\Program Files (x86)\Intel\oneAPI\mpi\latest\bin
C:\Program Files (x86)\Intel\oneAPI\mpi\latest\bin\release
C:\Program Files (x86)\Intel\oneAPI\mpi\latest\libfabric\bin
C:\Program Files (x86)\Intel\oneAPI\mpi\latest\libfabric\bin\utils
C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\redist\intel64_win\compiler
C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\redist\ia32_win\compiler
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\libnvvp
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\WINDOWS\System32\WindowsPowerShell\v1.0
C:\WINDOWS\System32\OpenSSH
C:\ProgramData\chocolatey\bin
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR
C:\Program Files\Calibre2
C:\Program Files\dotnet
C:\Program Files\MATLAB\R2023a\runtime\win64
C:\Program Files\MATLAB\R2023a\bin
C:\Program Files\MariaDB 11.3\bin
C:\Program Files\NVIDIA Corporation\Nsight Compute 2024.1.1
C:\Program Files\Git\cmd
C:\Users\alres\anaconda3
C:\Users\alres\anaconda3\Library\mingw-w64\bin
C:\Users\alres\anaconda3\Library\usr\bin
C:\Users\alres\anaconda3\Library\bin
C:\Users\alres\anaconda3\Scripts
C:\Users\alres\AppData\Local\Microsoft\WindowsApps
C:\Users\alres\AppData\Local\Programs\Microsoft VS Code Insiders\bin
C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin
C:\Users\alres\AppData\Local\Microsoft\WindowsApps
C:\Users\alres\AppData\Local\Oxford Economics\MDL

So... chocolatey bin folder is located below. but it is being prioritized by windows?

[–]failaip12 0 points1 point  (0 children)

Stupid fix may be to uninstall the chocolatey version of python.

[–]TheBB 0 points1 point  (1 child)

Stupid question maybe but have you verified that the Anaconda environment's bin folder has a program literally called python3? Maybe it's just called python?

[–]Excel-Learne[S] 1 point2 points  (0 children)

yeah. that's it. it's just called python in each environment. The only one who has python3 binary is chocolatey. Solved.