I'm asking this question here and not on Stack Overflow because it appears to be MacOS specific. Many answers over there point to searching for a bad "json.py" module however we can see from the following that no such bad module is being imported.
How do I "fix" the Python 3 installation?
$ python3
Python 3.7.7 (default, Mar 10 2020, 15:43:33)
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import json
>>> d = {'a' : 100, 'b' : 200}
>>> json.dumps(d)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'json' has no attribute 'dumps'
>>> print(json.file)
None
Here's where it is located:
$ which python3
/usr/local/bin/python3
I've tried a brew reinstall python3 to no avail.
brewto do anything, yet I have python. The point here is I believe doing thebrewinstall may be corrupting something. Uninstall python from brew, uninstall brew. Install the packages from python.org. – jnovack Oct 02 '20 at 14:28brewhas not inherently been a problem for me-- and it's only necessary as a dependency for otherbrew-installed packages. I did corrupt the installation, however, and it turns out that, to your point, removing it completely allows built-in Python3 to be found. – Charney Kaye Oct 02 '20 at 15:05