1. 程式人生 > 其它 >python-pip升級報錯- AttributeError: 'NoneType' object has no attribute 'bytes'

python-pip升級報錯- AttributeError: 'NoneType' object has no attribute 'bytes'





easy_install -U pip

  

正常的pip升級命令:

python -m pip install --upgrade pip

我之前也一直就用這個命令升級,沒碰到啥問題,但是之前一直是在終端裡敲的

今天在pytharm裡面建立了一個Python專案,pytharm會自動搭建一個新的Python環境,在當前的目錄下
使用

python -m pip install --upgrade pip

會報錯

AttributeError: 'NoneType' object has no attribute 'bytes'
  • 1

初學Python,到處查資料,發現一個新命令列可以有效解決這個問題,特此記錄

easy_install -U pip
TRANSLATE with x English
Arabic Hebrew Polish
Bulgarian Hindi Portuguese
Catalan Hmong Daw Romanian
Chinese Simplified Hungarian Russian
Chinese Traditional Indonesian Slovak
Czech Italian Slovenian
Danish Japanese Spanish
Dutch Klingon Swedish
English
Korean Thai
Estonian Latvian Turkish
Finnish Lithuanian Ukrainian
French Malay Urdu
German Maltese Vietnamese
Greek Norwegian Welsh
Haitian Creole Persian  
  TRANSLATE with COPY THE URL BELOW Back EMBED THE SNIPPET BELOW IN YOUR SITE Enable collaborative features and customize widget:
Bing Webmaster Portal
Back