簡體   English   中英

在python2.7.5和舊版本問題上安裝pip

[英]installing pip on python2.7.5 and the old version issue

我想對使用 python2.7.5 開發的代碼進行一些更改,所以我應該使用 Python 2.7.5。 但是當我在 python2.7.5 上安裝 pip 時,遇到這個錯誤。 I have downloaded get-pip.py and ran it through cmd here is the error: DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 將刪除對此功能的支持。 在此處輸入圖像描述是否意味着我們不能再使用 Python2 了?

可以使用 python 3,但您應該使用 2to3 package 轉換您的 python 2 代碼。 To do this you can install 2to3 using pip in python 3. Open command prompt and use this command: pip install 2to3 You should install pip in advance. 祝你好運!

嘗試使用 python 2.7.12 或更高版本,您可以在 python2 中運行所有 python 代碼

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM