-1
C:\Users\magnaboy\AppData\Local\Programs\Python\Python35\Scripts>pip install praw

Traceback (most recent call last):
  File "c:\users\magnaboy\appdata\local\programs\python\python35\lib\runpy.py", l
ine 184, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\magnaboy\appdata\local\programs\python\python35\lib\runpy.py", l
ine 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\magnaboy\AppData\Local\Programs\Python\Python35\Scripts\pip.exe\
__main__.py", line 9, in <module>
  File "c:\users\magnaboy\appdata\local\programs\python\python35\lib\pip.py", lin
e 194, in main
    bootstrap(tmpdir=tmpdir)
  File "c:\users\magnaboy\appdata\local\programs\python\python35\lib\pip.py", lin
e 83, in bootstrap
    from pip.commands.install import InstallCommand
ImportError: No module named 'pip.commands'; 'pip' is not a package

I've followed several tutorials with exact instructions and pip isn't working no matter what I do. I am on Windows 7 trying to install PIP on the latest version of Python. Any idea what I can do to fix this? All the tutorials I can find are outdated and dont provide a lot of information.

ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152
Magnaboy
  • 13
  • 1
  • 4
  • 1
    Notice that it says `'pip' is not a package`. You have a "pip.py" module in in your "Python35\Lib" directory. It doesn't belong there. – Eryk Sun Nov 23 '16 at 07:32

1 Answers1

1

@eryksun is right, you haven't installed pip correctly, and there shouldn't normally be any pip.py in Lib.

It looks like the PIP bootstrap script (I dunno what it's doing or how it got there): that script does have from pip.commands.install import InstallCommand on line 83 in a function named bootstrap.

So, either

  • delete it and run ensurepip, or
  • move it out of Python installation and run it as a standalone script as per its docs.
Community
  • 1
  • 1
ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152