【Python】【pip问题】Traceback (most recent call last): File "/usr/bin/pip", line 9, in

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/qq_15698613/article/details/99733365

error

Entry

pip install numpy


An error occurred

 Solution

sudo vi /usr/bin/pip

from pip import main  
if __name__ == '__main__':  
    sys.exit(main()) 

 Line 9, line 11 to be modified

from pip import __main__  //修改
if __name__ == '__main__':  
    sys.exit(__main__._main())//修改

See, some two horizontal lines, some a horizontal line

Then run the discovery is successful

Guess you like

Origin blog.csdn.net/qq_15698613/article/details/99733365