ModuleNotFoundError: No module named 'pip.commands'

Viewed 2761

I am getting the following error:

Traceback (most recent call last):
File "setup.py", line 8, in <module>
from pip.commands import WheelCommand
ModuleNotFoundError: No module named 'pip.commands'

While I have python (screenshot attached)

Python 3.6.3 :: Anaconda, Inc.

pip 18.1

wheel 0.32.2

Any suggestion will be highly appreciableenter image description here

1 Answers

There is a little problem with you import in setup.py file. you should write like this:

from pip._internal.commands import WheelCommand

it is because you can only import 1._vendor and 2._internal from pip.

Related