Pkg.build("PyCall") errors. Need help

Hi,

Does anyone know how I can use Pkg.build(“PyCall”) without errors in Windows? It keeps failing and I am not sure how to fix it. Any help appreciated

julia> Pkg.build("PyCall")
INFO: Building Conda
INFO: Building PyCall
Info: Using the Python distribution in the Conda package by default.
To use a different Python version, set ENV["PYTHON"]="pythoncommand" and re-run Pkg.build("PyCall").
Info: Running `conda install -y numpy` in root environment
ERROR conda.core.link:_execute(502): An error occurred while installing package 'defaults::charset-normalizer-2.0.4-pyhd3eb1b0_0'.
CondaError: Cannot link a source that does not exist. C:\Users\armel\.julia\v0.6\Conda\deps\usr\Scripts\conda.exe
Running `conda clean --packages` may resolve your problem.
Attempting to roll back.


CondaError: Cannot link a source that does not exist. C:\Users\armel\.julia\v0.6\Conda\deps\usr\Scripts\conda.exe
Running `conda clean --packages` may resolve your problem.


===================================================[ ERROR: PyCall ]====================================================

LoadError: failed process: Process(setenv(`'C:\Users\armel\.julia\v0.6\Conda\deps\usr\Scripts\conda.exe' install -y numpy`,String["USERDOMAIN_ROAMINGPROFILE=ARMEL", "HOMEPATH=\\Users\\armel", "ProgramData=C:\\ProgramData", "ProgramW6432=C:\\Program Files", "PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW", "SESSIONNAME=Console", "APPDATA=C:\\Users\\armel\\AppData\\Roaming", "PUBLIC=C:\\Users\\Public", "USERDOMAIN=ARMEL", "OS=Windows_NT", "PROCESSOR_REVISION=9a04", "TMP=C:\\Users\\armel\\AppData\\Local\\Temp", "ALLUSERSPROFILE=C:\\ProgramData", "Path=C:\\Users\\armel\\AppData\\Local\\Julia-0.6.0\\bin;C:\\Users\\armel\\AppData\\Local\\Julia-0.6.0\\bin;C:\\Program Files\\Python311\\Scripts\\;C:\\Program Files\\Python311\\;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\MATLAB\\R2023a\\runtime\\win64;C:\\Program Files\\MATLAB\\R2023a\\bin;C:\\Program Files\\MATLAB\\R2022b\\runtime\\win64;C:\\Program Files\\MATLAB\\R2022b\\bin;C:\\Program Files\\Git\\cmd;C:\\Users\\armel\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\armel\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\armel\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\ffmpeg\\bin;C:\\Users\\armel\\AppData\\Local\\Programs\\Julia-1.6.7\\bin", "COMPUTERNAME=ARMEL", "USERNAME=armel", "CommonProgramFiles(x86)=C:\\Program Files (x86)\\Common Files", "CommonProgramFiles=C:\\Program Files\\Common Files", "CONDARC=C:\\Users\\armel\\.julia\\v0.6\\Conda\\deps\\usr\\condarc-julia.yml", "USERPROFILE=C:\\Users\\armel", "PSModulePath=C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules", "PROCESSOR_LEVEL=6", "EFC_5980=1", "=C:=C:\\Users\\armel\\.julia\\v0.6\\PyCall\\deps", "TEMP=C:\\Users\\armel\\AppData\\Local\\Temp", "SystemDrive=C:", "HOMEDRIVE=C:", "PYTHONIOENCODING=UTF-8", "ZES_ENABLE_SYSMAN=1", "LOCALAPPDATA=C:\\Users\\armel\\AppData\\Local", "PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 154 Stepping 4, GenuineIntel", "DriverData=C:\\Windows\\System32\\Drivers\\DriverData", "NUMBER_OF_PROCESSORS=12", "=::=::\\", "ComSpec=C:\\Windows\\system32\\cmd.exe", "SystemRoot=C:\\Windows", "OneDrive=C:\\Users\\armel\\OneDrive", "ProgramFiles(x86)=C:\\Program Files (x86)", "OPENBLAS_NUM_THREADS=8", "LOGONSERVER=\\\\ARMEL", "CONDA_PREFIX=C:\\Users\\armel\\.julia\\v0.6\\Conda\\deps\\usr", "windir=C:\\Windows", "CommonProgramW6432=C:\\Program Files\\Common Files", "ProgramFiles=C:\\Program Files", "__COMPAT_LAYER=DetectorsAppHealth", "PROCESSOR_ARCHITECTURE=AMD64", "OPENBLAS_MAIN_FREE=1"]), ProcessExited(1)) [1]
while loading C:\Users\armel\.julia\v0.6\PyCall\deps\build.jl, in expression starting on line 239

========================================================================================================================

====================================================[ BUILD ERRORS ]====================================================

WARNING: PyCall had build errors.

 - packages with build errors remain installed in C:\Users\armel\.julia\v0.6
 - build the package(s) and all dependencies with `Pkg.build("PyCall")`
 - build a single package by running its `deps/build.jl` script

========================================================================================================================

julia>

Are you actually using Julia version 0.6, which is many years out of date? In principle PyCall should work with 0.6 (I certainly used it in those days) but if you really are on 0.6 it’s probably a better idea to move to a newer version (1.8 is the current release, 1.9 release is imminent) before trying to debug this.