Strawberry fields is taking forever to load

I have installed Strawberry fields library on Python 3.9.X and I tried loading the below code:

import strawberryfields as sf
from strawberryfields.ops import *

And it is taking forever to load the library. It’s been 30 minutes and still loading on Jupyter Notebook cell and on pure python (.py) it is equally slow. Can someone help me to fix this?

Hi @sleepingcat4 ,

Did you create a virtual environment for this? I would recommend following these steps:

  1. Install Miniconda following the instructions here.
  2. Open your terminal (mac) or command line (Windows).
  3. Create a new Conda environment with: conda create --name
    <name_of_your_environment> python=3.10
  4. Activate the environment with: conda activate <name_of_your_environment>
  5. Install Strawberry Fields with: python -m pip install strawberryfields
  6. Install other useful packages such as jupyter with: python -m pip install jupyter

Note that where it says <name_of_your_environment> you can choose any name that you want.
If this doesn’t work you can try using Strawberry Fields on Google Colab. I hope this helps!