Installing CVX on a new Mac

INSTRUCTIONS FOR INSTALLING CVX ON A NEW MAC
Tim Mitchell and Michael L. Overton

New Mac security protocols make installing CVX extremely painful, because it is suspicious of the executable files included in CVX. We suggest you use the following extremely kludgy algorithm to install CVX. Alternative ideas are posted elsewhere on the CVX Forum, but we could not get these to work.

% Install macOS Command Line Tools (in case they are not installed)
Open Terminal
Run “sudo xcode-select --install” in order to install Command Line Tools
In the popup, click “Install” (Do NOT click “Get Xcode” if it appears, as that requires many gigabytes)

% Open security preferences, as it will be needed frequently
Open macOS System Preference -> Security and Privacy -> General

% Run cvx_setup multiple times to make all the necessary security exceptions
Open MATLAB and cd to the directory where CVX is installed
Repeat
Launch cvx_setup in MATLAB while in your cvx folder
While this instance of cvx_setup is still running
If a window pops up with 2 options (Move to Trash and Cancel)
Click “Cancel”
Click “Allow anyway” in the System Preferences panel
Else if a window pops up with 3 options (Open, Move to Trash, and Cancel)
Click “Open”
Until cvx_setup terminates without an error or any popups

Finally, add CVX to your path.

Notes:

  1. It will take several launches of cvx_setup to correctly make all of the security exceptions for CVX files.

  2. When you click “Cancel” in the window with 2 options, it may happen that a new window pops up before you have a chance to click “Allow anyway”. If this happens, just go back to the System Preferences to first click “Allow anyway”, and then return to handling the new pop-up window.

I have seen the similar situation like you, but when I do it your way, after clicking several "allow anyway"s, my Matlab crashes, and if i re-open my Matlab again, every time I run “cvx_setup” it just crashes without doing anything else.