Is is necessary to delete pyc files when upgrading Python **within** a major release?
Is is necessary to delete pyc files when upgrading Python **within** a major release? TL;DR If you switch back-and-forth between 3.6.6 and 3.7.0 before you adopt 3.7.0, there is no concern, the two sets of pyc files will cohabit and you'll be ok. What if you switch back-and-forth between 3.6.4 and 3.6.6? Do you need to delete pyc files? Long version I see that the pyc files are specific for major releases only. For example I have: __init__.cpython-36.pyc __init__.cpython-37.pyc which is presumably the result of PEP 3147. And so it's clear enough. If I move back-and-forth during development between virtual environments in, say, 3.6.6 and 3.7.0, there is no concern. The two versions will cohabit in the __pycache__ directory because they are identified by the major version number. __pycache__ Question : What about switching back-and-forth between, say, 3.6.4 and 3.6.6, do I indeed need to delete pyc files when switching from one version and another within the same major release? ...