Run Ccleaner's registry cleaner. Select the 'fix' tab and don't save. Reboot, which is important. Try installing the latest version again. If that fails then use the removal tool. Download and save to desktop. Reboot to safe mode and run the removal tool. Re-boot and try to install the latest version.
OnePlus 5 review