SF not working following installation

Hi, I am having some trouble getting SF working. In a Jupyter notebook, I am doing import strawberryfields as sf but am getting the following error:

ModuleNotFoundError: No module named 'numba.cpython'

I checked that numba is installed with conda list and it is there alongside strawberryfields so I am not sure why it’s not working. For the following libraries, I have these versions installed: numba=0.48.0, strawberryfields=0.19.0, thewalrus=0.16.2 and cpython=0.0.6

Any help getting things working would be much appreciated!

Hi @Edward_Deacon!

Welcome to the Forum and thank you for asking your question here!

I think that the problem might be that your numba version is too old. You can try pip install numba --upgrade.

Please let me know if this works!

Hi @CatalinaAlbornoz ,

Thanks for your suggestion. I just tried that and in the prompt it came up with a couple of errors during the upgrade:

It looks like the upgrade would cause numba to be a version incompatible with thewalrus and that there is some error with the llvmlite library. Is there a way to specify the version of numba that is installed? And do you have any ideas for the llvmlite library issue?

Thanks for your help!

Hi @Edward_Deacon, you can try pip install numba==0.53.1

Why don’t you try this and let me know if the other error continues to appear?

1 Like

I fixed it! I did pip install numba==0.49.1 and got no errors in the prompt. I fired up a SF tutorial notebook and it ran just fine. Thanks for your help @CatalinaAlbornoz, it’s much appreciated :slight_smile:

I’m glad it worked @Edward_Deacon!

Feel free to ask any other questions you may have!

1 Like