Try the following in order as needed:
1 - launch Photos with the Option held down and try to create a new test library. Import a couple of photos into it and run for a few minutes. Then try launching your original library.
2 - launch your original library with the Option+Command keys held down to rebuild/repair the library. If that fails to fix the problem go on to #3.
3 - boot into Safe Mode according to How to use safe mode on your Mac and test to see if the problem persists. Reboot normally and test again.
NOTE 1: Safe Mode boot can take up to 3 - 5 minutes as it's doing the following;
• Verifies your startup disk and attempts to repair directory issues, if needed
• Loads only required kernel extensions (prevents 3rd party kernel/extensions from loading)
• Prevents Startup Items and Login Items from opening automatically
• Disables user-installed fonts
• Deletes font caches, kernel cache, and other system cache files
NOTE 2: if you have a wireless keyboard with rechargeable batteries connect it with its charging cable before booting into Safe Mode. This makes it act as a wired keyboard as will insure a successful boot into Safe Mode.
