iTunes cannot sync photos to the iPhone because your iPhoto library is not yet available How to fix this issue and sync iTunes to iPhone correctly?

OS X Yosemite, iPhoto 9.6.1, iTunes 12.4.3.1; iPhone 5, iOS 9.3.3

I imported my pictures to iPhoto then tried to sync some unrelated changes to the iPhone through iTunes and got this error message. Restarting iPhoto and iTunes didn't help this time.



Disclaimer: I found the solution to this specific issue and I'm using this space to share it with others. Other solutions may be valid on different situations. I remember fixing this once by restarting the Mac. 



Here are some links related to this problem with some "heavy weight" solutions I didn't try this time:


http://osxdaily.com/2013/06/30/itunes-not-syncing-iphone-ipad-ipod-fix/
https://discussions.apple.com/thread/6831863
https://discussions.apple.com/thread/7180697
After restarting both iPhoto and iTunes a few times and trying it again, eventually I decided to (1) delete the previously imported photos on iPhoto:


Since I didn't want to delete them, (2) I created a new album with them and, once back to iTunes, (3) checked the new album to be sync'ed back to the iPhone.

It worked!