Having just upgraded to pip-18.0
all uses of pip produce this error:
...\site-packages\pip\_internal\__init__.py", line 5, in <module>
import logging
ModuleNotFoundError: No module named 'logging'
logging.py exists in \site-packages\pip\_internal\utils\
(and also contains an 'import logging' statement!)
I suppose I could move it up a directory level or update _init to 'import utils.logging' In fact lots of my programs' packages eg numpy are now failing with no logging module. I have now identified the problem:
import logging
Traceback (most recent call last): File "", line 1, in import logging ModuleNotFoundError: No module named 'logging'
import lib2to3.logging
lib2to3 is a subdir of Lib, containing the logging module, but is no longer found in the module search.
import logging
is intended to import\site-packages\pip\_internal\utils\logging.py
, I'm sure it's rather intended to import logging package from Python stdlib. Verify that you have\logging
package sibling to\site-packages
. – phd Jul 30 '18 at 13:47