Allanon
Allanon

Reputation: 31

problem with cvxopt on mac //incompatible architecture

I need cvxopt to run some portfolio optimization scripts. I have a MacBook pro with an M1 chip running Monterey 12.3, Python 3.10.2 and pip 22.0.4. I installed cvxopt with pip, also installed Rosetta2 but I keep getting the following message:

Exception has occurred: ImportError
dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cvxopt/base.cpython-310-darwin.so, 0x0002): tried: '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cvxopt/base.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))

Could someone help? I am quite new to programming and only recently moved to Mac which I am still getting to grips with. Thanks!

I read all the threads I could find, installed Rosetta2 manually, checked the version of python and pip I had but everything seems fine as far as I can tell.

Upvotes: 3

Views: 718

Answers (1)

StanislavSychev
StanislavSychev

Reputation: 11

Building cvxopt from source with pip install --no-binary cvxopt cvxopt solved this problem for me.

Upvotes: 1

Related Questions