About python pip installation (pip install pyswmm) error

See my comment in another thread earlier today:

You don’t run pip from inside the Python environment. You need to run it from the Windows command prompt.

Because you have two versions of Python on your system, it is important that you use the py -m pip ... version of the command, otherwise you may get confusion over which Python gets the packages installed.

I’m not sure how it works on Windows, but if pip still doesn’t work, you may need to run py -m ensurepip first to set it up. The documentation says you won’t need to run it, but who knows?

  1. Make sure you are running from cmd.com and not the Python interpreter, if you see the >>> prompt you are in Python.
  2. Try using py -m pip install PackageName (for whatever package you are trying to install).
  3. If and only if that reports an error “No module named pip” should you then try py -m ensurepip.

Good luck!