0
$\begingroup$

I am on MacOS 10.14.6. Installed Python3.9, create env with venv and installed qiskit.

When I import qiskit, I get the ImportError, see below:

(ibm) PM7-0547:~ emiranda$ python3

>>> import qiskit
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/emiranda/python-virtual-environments/ibm/lib/python3.9/site-packages/qiskit/__init__.py", line 26, in <module>
    from qiskit.circuit import ClassicalRegister
  File "/Users/emiranda/python-virtual-environments/ibm/lib/python3.9/site-packages/qiskit/circuit/__init__.py", line 231, in <module>
    from .classicalfunction.types import Int1, Int2
  File "/Users/emiranda/python-virtual-environments/ibm/lib/python3.9/site-packages/qiskit/circuit/classicalfunction/__init__.py", line 98, in <module>
    from .classicalfunction import ClassicalFunction
  File "/Users/emiranda/python-virtual-environments/ibm/lib/python3.9/site-packages/qiskit/circuit/classicalfunction/classicalfunction.py", line 18, in <module>
    from tweedledum.classical import simulate
  File "/Users/emiranda/python-virtual-environments/ibm/lib/python3.9/site-packages/tweedledum/__init__.py", line 5, in <module>
    from ._tweedledum import *
ImportError: dlopen(/Users/emiranda/python-virtual-environments/ibm/lib/python3.9/site-packages/tweedledum/_tweedledum.cpython-39-darwin.so, 2): Symbol not found: _aligned_alloc
  Referenced from: /Users/emiranda/python-virtual-environments/ibm/lib/python3.9/site-packages/tweedledum/_tweedledum.cpython-39-darwin.so
  Expected in: /usr/lib/libSystem.B.dylib
 in /Users/emiranda/python-virtual-environments/ibm/lib/python3.9/site-packages/tweedledum/_tweedledum.cpython-39-darwin.so
>>> 

Any ideas of what went wrong? I followed exactly the same procedure to install qiskit on another machine a few weeks back and had no problems.

$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.