Why do I get an import error when importing Qiskit?

Solution for Why do I get an import error when importing Qiskit?
is Given Below:

Whenever I import qiskit, I get the following error. Anyone know why?


ImportError: dlopen(/opt/anaconda3/lib/python3.8/site-packages/tweedledum/_tweedledum.cpython-38-darwin.so, 2): Symbol not found: _aligned_alloc
  Referenced from: /opt/anaconda3/lib/python3.8/site-packages/tweedledum/_tweedledum.cpython-38-darwin.so
  Expected in: /usr/lib/libSystem.B.dylib
 in /opt/anaconda3/lib/python3.8/site-packages/tweedledum/_tweedledum.cpython-38-darwin.so

It seems like there was an issue while installing one of the Qiskit dependencies called tweedledum. You can try the following in your anaconda env:

pip install --upgrade --force-reinstall tweedledum