numpy – Which pip is with which python?

numpy – Which pip is with which python?

You can run pip with a specific version of Python by running it as a module. Command line arguments work just as if running directly from the command line. For example, try:

python -m pip list

If that still lists numpy it probably means there is something wrong with the numpy installation — i.e. the .egg file is there, but the module folder is not. To try and fix this you can use --force-reinstall with pip, e.g.

python -m pip install numpy --force-reinstall --upgrade

If that still doesnt work, you can resort to going to the folder reported by sys.path and deleting anything numpy related manually.

Since your pip setup seems messed up you might want to try reinstalling pip too!

The most accurate method is to call pip from the specific python executable. For example:

/usr/bin/python -m pip list -v
/usr/local/bin/python3 -m pip list -v

numpy – Which pip is with which python?

Leave a Reply

Your email address will not be published. Required fields are marked *