0

I am trying to install a list of packages from a text file by running a batch file.

install_python_modules.bat has:

    python -m pip install -r python_modules_requirements.txt
    @REM python -m pip install slimit
    @REM python -m pip install pycparser

etc. etc.

I am receiving "No module named pip" . What is my machine missing here?

Thanks

Shahid Aslam
  • 2,585
  • 3
  • 24
  • 31
ET sense
  • 7
  • 2
  • 3
    Possible duplicate of [Why am I getting ImportError: No module named pip ' right after installing pip?](https://stackoverflow.com/questions/32639074/why-am-i-getting-importerror-no-module-named-pip-right-after-installing-pip) – Giorgos Myrianthous Jun 12 '19 at 11:40
  • other than notifying this untrue comment, can you help? – ET sense Jun 12 '19 at 12:08

1 Answers1

0

This is most likely a PATH problem. The first test would be opening a command prompt and simply typing 'python' - if there is an output other than the following:

'python' is not recognized as an internal or external command,
operable program or batch file.

then the problem is not PATH.

If you can launch python but not pip, then it's most likely a directory error. Try navigating to
C:/Program Files/Python
or
C:/Program Files(x86)/Python
or, as tgikal mentioned,
C:/Users/%USERNAME%/AppData/Local/Programs
and opening the 'Scripts' folder. There, you should find the pip.exe executable, and if you start a command prompt in that folder, it should work.

On the topic of resolving the issue permanently, check out this guide to add pip.exe to your path.

  • 1
    It seems like python is more commonly installed to `%LocalAppData%\Programs\Python` now days. – tgikal Jun 12 '19 at 13:26