PIP module has no "main" attribute
EDIT: The computer in question was a client machine with restrictions on what software can be installed. I'm not sure if this could be the cause of this issue or if the client's IT department gave the machine a corrupted pip version. The recommended answers below would probably have worked, but were blocked by the company's IT department and required an administrator login. Since then I have left this project and I hope to avoid such situations.
I am trying to install WHL file
When trying to execute:
import pip
my_path = <a path to the WHL file>
pip.main(['install', my_path])
I got an attribute error:
'module' object has no attribute 'main'
I ran help (pip) and
__main__
was listed as package content.
I am running Python 3.4 on the console.
+3
source to share
3 answers