TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Pip has dropped support for Python 2

774 pointsby groodtover 4 years ago

36 comments

ChuckMcMover 4 years ago
This is awesome in terms of avoiding all of the weird things when a person typed pip rather than pip3 and module didn't seem to get installed anywhere. That said, watching perl trying to kill perl5 with perl6 (unsuccessful) and python trying to kill python 2 with python 3 (more successful) it struck me how ridiculous it is that open source languages have to put up with this. Clearly "major" numbers are insufficient, the only real answer is to rename the entire freaking language when you make incompatible changes to it.
评论 #25889468 未加载
评论 #25891394 未加载
评论 #25891026 未加载
评论 #25889479 未加载
评论 #25889433 未加载
评论 #25889745 未加载
评论 #25890436 未加载
评论 #25891571 未加载
评论 #25890254 未加载
评论 #25890652 未加载
评论 #25891632 未加载
评论 #25891082 未加载
评论 #25893269 未加载
评论 #25892213 未加载
评论 #25891510 未加载
评论 #25892696 未加载
评论 #25893568 未加载
评论 #25892336 未加载
at_a_removeover 4 years ago
I&#x27;m in an awkward chain of dependencies. You see, in my industry there are very few players, and the current version of their software depends on much functionality and rather exacting specifications from products which are made using ArcGIS 10.2.1. Not 10.2. Not 10.2.2.<p>This is a very conservative hunk of software because this is not a &quot;move fast and break things&quot; industry. This is a &quot;people die when we screw up&quot; industry. So they haven&#x27;t moved from ArcGIS 10.2.1 for our version. Change <i>is</i> coming but they have to be careful.<p>So ArcGIS 10.2.1 comes with a python install of 2.7.2 (I am pretty sure it is .2). And you are very strongly advised NOT TO UPGRADE THAT in big bold letters on the relevant help pages. So I need to use 2.7.2 to manipulate some stuff out of ArcGIS 10.2.1 to do &quot;stuff.&quot;<p>And there I sit.
评论 #25890088 未加载
评论 #25890061 未加载
评论 #25889285 未加载
评论 #25889552 未加载
评论 #25890068 未加载
评论 #25889965 未加载
haram_masalaover 4 years ago
It&#x27;s telling that there are a number of commercially available Python libraries targeting enterprise customers for which the Python 3 version is free, but there&#x27;s a hefty license fee for the Python 2 version. Maybe that&#x27;s an appropriate tax on sluggish software&#x2F;IT departments.
评论 #25889361 未加载
评论 #25890283 未加载
评论 #25889347 未加载
评论 #25899387 未加载
评论 #25889794 未加载
atoavover 4 years ago
I managed to avoid Python 2 for nearly 3 years now in my projects, I think it is time to get rid of it for good and use the new freedoms to improve the tooling.<p>It is so ironic that in Python the most &quot;unpythonic&quot; thing is the version management of the language and libraries etc itself.<p>Something like python poetry, venv etc are great steps into the right direction, but there should be an official solution that &quot;just works&quot; and is predictable.<p>When I give python courses I usually skip dependency managment and explain it in the very end because it would probably (rightfully so) break the will of everybody involved. It shouldn&#x27;t be like that
评论 #25890984 未加载
PaulHouleover 4 years ago
The worst thing that happened to Python was rhat Linux distros not only shipped it but used it pervasively for scripting. Thus replacing Py 2 became a huge problem.<p>Until recently it was easier to set up for Python dev on Windows because you could download a clean Python and not worry about broken Pythons on your path.<p>Microsoft wrecked it all last year by including a system Python and they&#x27;ll probably play games to keep it in front of your Python on the path.so you will be typing pip3.7, pip3.8, pip-3.6-pypy, etc. for the rest of your life.
评论 #25891674 未加载
评论 #25893531 未加载
mbar84over 4 years ago
Since the Python2-&gt;3 migration discussion is being had again here, I&#x27;d just like to advertise my compatibility library that can help with migrating old projects: <a href="https:&#x2F;&#x2F;github.com&#x2F;mbarkhau&#x2F;lib3to6" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mbarkhau&#x2F;lib3to6</a>
Aissenover 4 years ago
I&#x27;m more annoyed for the &quot;Drop support for Python 3.5&quot; than the first one. There are a few codebases I maintain where I already had to pin the pip version because the machine runs python 3.4, and then pin other package versions that did drop support for older python3 versions.
评论 #25891938 未加载
评论 #25891966 未加载
ianhanschenover 4 years ago
I have a background in systems engineering, working on a commercial operating system. I code in several languages. To me, it’s just a given that adoption extends the lifetime of something, even if it is not under active development. There’s a strange phenomenon with Python in particular, where it is upsetting for some reason to be told that Python 2.x will still be in use after we retire. To me this is just the natural way things work. There is so much stuff out there using Python 2.x where there’s no programmer around to do porting work and because things work, there’s no reason to invest. Normally when this sort of thing has happened to say, a language like VB, it doesn’t really matter because the end result is something compiled with a runtime. As long as the environment the app runs in has consistent behavior (app compat) there’s nothing to do. But with Python that isn’t precompiled you need the toolchain and dependencies. Python 2.x isn’t going anywhere, so I think Pip will ultimately have to keep and “freeze” support for Python 2.x, rather than not supporting it. If you are reading this and infuriated, perhaps ask some old hands you know, instead of taking my word for it. Flash is perhaps the closest example I can think of. Flash was “over” ages ago but browsers have had to keep support for an awful long time.<p>I give their decision a week before they revert and come up with an alternative.
评论 #25889257 未加载
评论 #25889431 未加载
评论 #25889146 未加载
评论 #25891549 未加载
评论 #25889066 未加载
评论 #25889065 未加载
评论 #25889047 未加载
dkdbejwi383over 4 years ago
I don&#x27;t really use Python much any more, and haven&#x27;t for a couple of years. I may have some Python projects coming up later this year though. What&#x27;s the current recommended way to deal with Python versions and isolating dependencies? Are there any good tools that simplify virtual environments &amp;c or am I best off just installing my required Python and packages in a Docker container?
评论 #25892728 未加载
评论 #25893239 未加载
评论 #25892731 未加载
Ceezyover 4 years ago
Common are they suppose to support python 1? Every languages has breaking change at some point. People needs to move on.
评论 #25889882 未加载
评论 #25890304 未加载
评论 #25889723 未加载
hprotagonistover 4 years ago
A nearly 13 month grace period beyond EOL seems quite generous to me.
评论 #25889083 未加载
评论 #25888485 未加载
评论 #25889475 未加载
评论 #25889084 未加载
blhackover 4 years ago
This thread is depressing. It seems like so many of us are happy to build an <i>incredibly</i> fragile world.
评论 #25892474 未加载
qwerty456127over 4 years ago
Python 2 has some value Python doesn&#x27;t have. E.g. there are Python 2 builds for really old platforms. There even are some considerably exotic platforms which are not so old and not deprecated but still don&#x27;t have Python 3.
评论 #25889691 未加载
x1798DEover 4 years ago
One thing that might be important to note about this: to the extent that pip is a client for PyPI, a strategy of freezing the last supported version of pip indefinitely may not work. It will presumably always be able to install Python 2 wheels from a local wheelhouse, but it&#x27;s worth being prepared for a future where `python2 -m pip install &lt;x&gt;` stops working.
Abishek_Muthianover 4 years ago
Just upgraded motioneye[1] Python 2 yesterday via pip, have been porting other smaller Python 2 projects to Python 3 for personal use for a while now.<p>But there are still large projects like motioneye where Python 3 port is WIP or not planned all.<p>[1]<a href="https:&#x2F;&#x2F;github.com&#x2F;ccrisan&#x2F;motioneye" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ccrisan&#x2F;motioneye</a>
评论 #25890704 未加载
评论 #25888923 未加载
wmichelinover 4 years ago
Good riddance! The fact that we&#x27;re still supporting Python 2 at all in 2021 is madness.
评论 #25888476 未加载
评论 #25889246 未加载
评论 #25888544 未加载
max_over 4 years ago
I am mostly a hobbyist dev, and the transition from Python 2 to 3 has been rather painful.<p>I have had to rewrite several projects, just so they could continue working.<p>But I understand the need fot it. So iam not bitter or anything
carapaceover 4 years ago
FWIW...<p>&gt; How long will PyPy support Python2?<p>&gt; Since RPython is built on top of Python2 and that is extremely unlikely to change, the Python2 version of PyPy will be around “forever”, i.e. as long as PyPy itself is around.<p><a href="https:&#x2F;&#x2F;doc.pypy.org&#x2F;en&#x2F;latest&#x2F;faq.html#how-long-will-pypy-support-python2" rel="nofollow">https:&#x2F;&#x2F;doc.pypy.org&#x2F;en&#x2F;latest&#x2F;faq.html#how-long-will-pypy-s...</a>
madsbuchover 4 years ago
A lot of research has been released with assets written in now defunct versions of Python. It is a shame that the barrier to reproduction just went up a lot.<p>One would hope that language designers would make the languages monotonically increasing to preserve compatibility and otherwise fork not projects when they loose confidence in previous features.
Narannover 4 years ago
I work in CGI and I&#x27;m happy to see Python moving forward, I&#x27;m so sad CGI is still lacking of broad Python 3 support. This industry was top notch 10 years ago but its inability to handle Python 3 migration since <i>years</i> despite its ubiquitous usage make me realize it&#x27;s no more an industry driving domain.
GNU_Jamesover 4 years ago
Why don&#x27;t we have a single interpreter that can run both Python 2 and 3 code?
评论 #25894120 未加载
评论 #25889696 未加载
评论 #25889569 未加载
评论 #25889580 未加载
评论 #25889733 未加载
diragonover 4 years ago
Common Lisp was a choice that many teams chose to ignore for whatever reasons. The price of perpetual upgrades is apparently cheaper than starting with a complete and stable language.
评论 #25892638 未加载
dleslieover 4 years ago
I have a bunch of old toolchains that use pip and python 2; I guess I&#x27;m screwed if I didn&#x27;t already create a vm or docker image.
评论 #25888601 未加载
emaover 4 years ago
I wonder how many of the people taking issue with Python2 still being used are using miles and inches to talk about distances?
评论 #25890627 未加载
lillesvinover 4 years ago
I only rarely use Python (Ruby, Go, R and Bash usually do whatever I need) and I&#x27;ve never gotten my head around the whole Python 2 vs 3 thing. For a language often touted to be the best language for novice programmers, I think it&#x27;s odd to expect them not to get caught with their metaphorical pants down in that dichotomy.<p>Edit: I should probably clarify. I have nothing against Python, quite the contrary, I&#x27;ve just always found that version 2 vs 3 thing odd.
ausjkeover 4 years ago
yet on my newest and best ubuntu20.04 when you type &#x27;python&#x27; you are still running python2, which I don&#x27;t use, will we ever be possible to use python as python3 by default,it&#x27;s annoying.<p>let python be python3, and python2 for python2 instead
评论 #25899656 未加载
Andrew_nenakhovover 4 years ago
The only thing I miss about Python 2 is print.<p>print &quot;hello&quot; &gt; print(&quot;hello&quot;)
评论 #25894184 未加载
phendrenad2over 4 years ago
Just started a new app using Python 2.7.19. Is switching to 3 worth it?
评论 #25889546 未加载
评论 #25888956 未加载
评论 #25889831 未加载
评论 #25888969 未加载
评论 #25888977 未加载
评论 #25889298 未加载
评论 #25888968 未加载
punnerudover 4 years ago
Then I finally can stop typing “python3 -m pip install ...”
dmartover 4 years ago
I don’t have a problem ideologically with the maintainers doing this since 2.7 is EOL, but making a breaking change like this over the weekend was kind of cruel.
评论 #25889300 未加载
gigatexalover 4 years ago
Good. Django moved the needle to improving python3 adoption just by moving their docs to include only python3 snippets. So this is another important step.
Udikover 4 years ago
So when&#x27;s Python4 coming out?
评论 #25892689 未加载
erichoceanover 4 years ago
Looks like Pip 20.0 will have a long life…
at_a_removeover 4 years ago
I couldn&#x27;t get pip to work with my stock install of Python that came with my, ah, daily driver.
krzykover 4 years ago
I still can&#x27;t get why they replaced: `print &quot;abc&quot;` with `print(&quot;abc&quot;)`.<p>Python REPL was my go to shell calculator and it is quite elaborate to put the parentheses around what I would like to print, for me that was the main drawback of python3.<p>But I don&#x27;t write production code in python, it is used only for small shell scripts, or like calculator.
评论 #25890566 未加载
评论 #25890542 未加载
评论 #25899677 未加载
cable2600over 4 years ago
Just like Visual BASIC 6.0, dropped for Visual BASIC.Net and Visual C#.Net because of progress. You can&#x27;t expect a language to last forever or support to last forever.<p>Now Python 4.0 is coming out, and soon Python 3.X will lose support.
评论 #25888776 未加载
评论 #25888741 未加载
评论 #25888744 未加载