Error when precompiling packages that rely on PythonCall

Update: I got rid of this issue now.
If anyone else has this problem, I solved it in the following way (probably not the best way but it worked :smiley: )

I don’t know if all of these steps are actually necessary but here we go:

  1. Since the error message suggested some issue with the pixi backend of CondaPkg (see JuliaPy/CondaPkg.jl: Add Conda dependencies to your Julia project), I switched the backend to MicroMamba:
]add PreferenceTools
]add MicroMamba
using PreferenceTools
]preference add CondaPkg backend=MicroMamba
  1. After restarting julia, it still seemed to use the pixi backend for some reason and the error persisted. I then tried the brute force way of removing Conda completely, deleting both, the directory
    C:\Users\INIT.julia\environments\v1.11.CondaPkg
    and C:\Users\INIT.julia\conda and running
]rm Conda
]rm CondaPkg
]add CondaPkg

After this, I was able to successfully use the OptimizationSciPy package.

2 Likes