Pennylane version

Hi, I was trying to use
dev = qml.device(“default.qubit”, wires=num_qubits)

and I’m getting an error:
DeviceError: The default.qubit plugin requires PennyLane versions 0.12, however PennyLane version 0.15.0-dev is installed.

I checked my pennylane version, and I’m getting these stats:
PennyLane==0.12.0

PennyLane-Cirq==0.14.0

PennyLane-Lightning==0.23.0

PennyLane-qiskit==0.14.0

I’m not sure why I’m getting this error.

Hi @xnt, it’s great that you asked this question here!

On one hand we’re already at PennyLane version 0.23.1 so if possible I would try to upgrade to that one. If you’re getting that specific error message it probably means that your virtual environment is picking up another version from your machine. My suggestion would be to create a new virtual environment and install PennyLane there.

Note that we only support Python versions 3.7 and newer so be sure to create your virtual environment on a supported version.

If you’re using conda this is a great cheat sheet where you can learn how to create a new environment.

Once you have that new environment you can do python -m pip install pennylane

You can check your PennyLane version in a Jupyter notebook by looking at the output of: import pennylane as qml; qml.about()

Once this is done you shouldn’t have any trouble with your code. Please let me know if the problem persists though!