Why does Importing Pennylane give out cannot import name "shape"

346 Views Asked by At

I am trying to import Pennylane in jupyter notebook. I installed it using Ubuntu.

import pennylane as cents

However, it is spewing out this:

ImportError: cannot import name 'shape'

I found two reasons online. One is that python needs to be at version less than 3.7[https://github.com/PennyLaneAI/pennylane/issues/1922]. To solve this I used pip install -U jupyter. Another reason is that Pennylane might be at a version earlier enough that it had a bug[https://discuss.pennylane.ai/t/importerror-cannot-import-name-shape/1383]. I installed Pennylane to the latest version I could find, 0.25. I did pip install pennylane==0.25 But it still does not work

Could someone please explain this to me?

0

There are 0 best solutions below