Error when using strawberry fields gaussian backend (ContextualVersionConflict)

Hello,

I was trying to use the gaussian backend as in the GBS tutorial (https://pennylane.ai/qml/demos/tutorial_gbs.html) but I’m getting the following error:

ContextualVersionConflict: (numba 0.45.1 (c:\users\kannan\anaconda3\lib\site-packages), Requirement.parse(‘numba>=0.49.1’), {‘thewalrus’})

How can I fix this? Both Pennylane and StrawberryFields have been updated to the latest version.

Hi @kannan_v,

That is odd! :thinking: Did you install PennyLane and Strawberry Fields via pip install pennylane strawberryfields? Fresh installs would generally have to pull a greater version of numba than that, so wondering what it could come down to. :thinking:

You could run pip install numba --upgrade as a fix to update the numba version that you have.

Let us know how this works out! :slightly_smiling_face:

Hello @antalszava,

Thank very you for the suggestion.
When I do tried to update numba, I was faced with this error:

ERROR: Cannot uninstall ‘llvmlite’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

This was then solved by giving the --user tag to the command as:
pip install numba --upgrade --user and that solved the issue!

Now I’m able to use the Strawberry Fields gaussian backend :slight_smile:

Hi @kannan_v,

Great to hear! Thanks for the clarification, it’ll be helpful for other people too.