Conda install nlopt. Option 3: Using a package manager like Conda.