I woke up this morning and found that half my standard library "went missing". It was working fine earlier this week. I haven't made any major system config changes in the past few days that would affect my Python installation (I don't think).
Basically, the following modules now throw "No module named x" errors from the REPL: math
, time
, itertools
, functools
The following modules continue to work: os
, sys
, abc
, thread
I haven't tested all the modules, but is there some way to debug this? Another side effect appears to be that the "up" and "down" arrows now print ^[[A
and ^[[B
instead of scrolling through history.
My Python is located at /Library/Frameworks/Python.framework/Versions/2.7/bin/python
, discovered via which python
.
I've verified that all standard library files do indeed exist in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
.
Running os.environ['PYTHONPATH']
returns a KeyError, which seems strange, but I've never had to explicitly set the PYTHONPATH before, and haven't modified my bash profile in the last few weeks.
I wasn't able to find anything relating to this specific issue, but I could well be missing something obvious. Any help is appreciated, thanks!