I am new to Python programming. Recently, I wrote a code which worked well. However, I needed to reinstall my Anaconda distribution and install the libraries I needed again. Then the code started to break. The version of Python I installed wouldn't support f-strings, although I did not use openpyxl directly, but it seems Pandas needed it, and some other behaviors which I think was due to using a different version of PyQt5.
How can I have a database of packages that my program uses with dependencies of said packages with their version number? Should I manually keep track of them, or is there some software or service to help?