11 ms·
Pip has dropped support for Python 2
- prakhargurunani 6y agoThis was need as developers were struggling to use packages with different Python versions in the same project.
- CameronNemo 6y agoHow does it work for reproducing scientific experiments using legacy Python 2 code? All of the major scientific libraries and core packages are dropping python 2 support. Are there legacy versions of these packages being maintained or at least preserved? Is this even a valuable use case?
- mattnewton 6y agoI assumed that the old pip versions would keep working, as long as the python2 packages kept being hosted, and this is just freeing new pip development from being python2 compatible. Does anyone know if this is the case? If not, it’s a good argument for vendoring dependencies when publishing scientific code.
- lumpa 6y agoMaybe if you're reproducing a scientific experiment you should use the original package versions? New releases of pip or scientific libraries won't support Python 2, but the old versions should still work. And you won't be running different code from using up-to-date versions.
- dragonwriter 6y ago> How does it work for reproducing scientific experiments using legacy Python 2 code? Install Python 2.7, which is by does with pip. Upgrade pip if you want, which will get you the last version of pip that supports Python 2 (the old versions haven't gone away, new versions just don't support py2 and won't show up when upgrading on py2). Install the needed scientific libraries. Run code. > Are there legacy versions of these packages being maintained or at least preserved? AFAIK, there is no plan to remove py2 packages from pyPI.
- mywittyname 6y agoBut why drop Python 3.5 as well? Other than f-string, I'm not sure what critical features were brought in with 3.6.
- wmichelin 6y agoI don't see why you'd keep 3.5 around
- mikepurvis 6y agoUbuntu 16.04 has Python 3.5 as its default `python3`.
- awestroke 6y agoI don't see why you'd keep 16.04 around
- mikepurvis 6y agoIt's supported until the end of April. Obviously we're in the process of migrating things, but it's either supported or it's not, and as long as it's supported, it should work.
- dragonwriter 6y agoIt probably would work if you didn't subvert it by trying to use the latest and greatest pip from pyPI instead of the OS python-pip package.
- mikepurvis 6y agoUsing the latest pip is the will of the PyPA, and they let you know this on every invocation that touches the network: You are using pip version 8.1.1, however version 21.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. There are also packages and workflows which break on the older pips, and this has been justified on the basis that everyone can always just use the latest.
- thepasswordis 6y agoThe major takeaway from this is: if your project is mission critical, then don't depend on free/open source infrastructure. It's not like there is a "rep" you can call at "python" if this is now breaking your build process. edit: almost all of these replies have missed my point. Yes, you can still use python2, but if you depended on pip for your build process (which I would consider "infrastructure"), then you are out of luck for this and there is nobody you can call to fix it for you.
- sergiomattei 6y agoNo, the major takeaway is "update your software". Damn it, Python 3 has been out for years now. There is zero excuse.
- itamarst 6y agoIt still works, they're just not doing new releases.
- philtar 6y agoOr, you know, upgrade in the 12 years you had to upgrade since Python announced it was moving Python 3.
- digitalsushi 6y agoMy problems are largely coupled heavily into the python2 that my package manager is written in, which as far as my team tells me, is python2. And that it's becoming difficult to integrate against products we have to continue to release for another five years of corporate sunsetting.
- etc-hosts 6y agoBeing diligent and internally mirroring your python dependencies is the correct thing to do, but this is a different issue.
- njharman 6y agoYeah, its not like you access to and the sources of all versions of Python. No proprietary vendor has ever revoked licenses, pulled downloads, version or timebombed binaries, stopped support for eol products, auto upgraded, etc. Yes open-source is clearly worse for giving you the right and means. Vs being subject to the whims and profitability of a company.
- itamarst 6y agoPeople keep misunderstanding this, so just to clarify: pip still works on Python 2! They just aren't doing any new releases for Python 2. $ virtualenv --python=python2.7 /tmp/venv $ /tmp/venv/bin/pip install --upgrade pip ... Successfully installed pip-20.3.4 $ /tmp/venv/bin/pip install flask ... Collecting flask Using cached Flask-1.1.2-py2.py3-none-any.whl (94 kB) ... The mechanism, as used by other projects as well, is that when you upload a project to PyPI you can set a minimal required version of Python. So when you upgrade, you get the latest version that supports the current version of Python. Sometimes maintainers screw this up, but so long as the maintainers do this everything Just Works: people on old Python get old packages, people on new Python get new packages.
- arusahni 6y agoWorth clarifying, too: if you have tooling that depends on `get-pip.py`, you'll need to change your reference to https://bootstrap.pypa.io/2.7/get-pip.py https://bootstrap.pypa.io/2.7/get-pip.py
- bitwize 6y agoEven so, the writing is on the wall. The Python 2 repository will eventually become too old to be useful, and the plug will be pulled on it. So upgrade to Python 3, people, if you haven't. Seriously.
- Ceezy 6y agoThis post is very similar to this -> https://news.ycombinator.com/item?id=25888249 https://news.ycombinator.com/item?id=25888249
- zabzonk 6y agohttps://news.ycombinator.com/item?id=25888249 https://news.ycombinator.com/item?id=25888249
- kefabean 6y agoDoes anyone have any new insight in to plans to resolve pip search which has been broken for over a month now? xmlrpc.client.Fault: <Fault -32500: "RuntimeError: PyPI's XMLRPC API has been temporarily disabled due to unmanageable load and will be deprecated in the near future. See https://status.python.org/ for more information.">
- moreati 6y agoI'm not aware of any plans to fix the search API, but to be clear the website search still works, e.g. https://pypi.org/search/?q=foo https://pypi.org/search/?q=foo
- tyingq 6y agoDoesn't look great: https://github.com/pypa/pip/issues/5216 https://github.com/pypa/pip/issues/5216 Sounds like 'pip search' will either be deprecated, or replaced with a client side search that requires a fairly big download.
- jspaetzel 6y agoCould use a better title on this, it's misleading.
- deleted 6y ago[deleted]