程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

2022 - do not install python2 before 7.9

編輯:Python

It is hard to avoid encountering something left over by history python 2 Code for .

If specified... Is required python 2.7 Code for , Please install python2.7.9 edition , Do not install an earlier version of it .

because python 2.7.9 It contains several unprecedented major changes :

  • Python 3.4 All ssl Modules have been ported backwards to Python 2.7.9.
  • Now, the system certificate store is enabled by default HTTPS Certificate validation .
  • ensurepip modular Module migrated backwards , Provide pip Package manager .

The above is the conclusion , Here is the process of stepping on the pit . Installed python 2.7.0 Finally, I didn't climb out of the pit .

  1. Manual installation Python 2.7.0 Release. stay win10 Of cmd perhaps powershell in , perform python command , But the app store pops up , You can refer to Win 10 Use in Python The strange phenomena we encountered
  2. 2.7.0 The default version does not have pip, In order to pretend pip, Had to be installed manually setuptools
  3. next , We install it manually pip: C:\Python27\python.exe .\setup.py install. If after installation ,pip Not in the search path , You can refer to Python pip : Cannot be “pip”. I used the absolute path directly .
  4. However , Installed pip after , We can't use pip To install other python package . Because I can't access the warehouse .
    because pip What I visited was http://pypi.python.org/simple/. and , What should have been visited https://pypi.python.org/simple/
     C:\Python27\Scripts\pip.exe install chard
    Downloading/unpacking chardet==1.1
    Cannot fetch index base URL http://pypi.python.org/simple/
    Could not find any downloads that satisfy the requirement chardet==1.1
    No distributions at all found for chardet==1.1
    Storing complete log in C:\Users\GRRJ\AppData\Roaming\pip\pip.log
    
  5. You can then specify pip Source , Manually add ssl modular , Import the certificate manually . Oh My Gold~ Give up , Direct installation python2.7.9

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved