Which pip is with which python?

后端 未结 1 1157
迷失自我
迷失自我 2021-01-16 06:11

This is driving me crazy. I have tried to remove all the packages of python installed on mac os x el capitan and re-installed brew install py

相关标签:
1条回答
  • 2021-01-16 07:06

    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 doesn't 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!

    0 讨论(0)
提交回复
热议问题