<span style="font-family: Arial; font-size:12pt">In reading this discussion with interest. pip and PyPI are what make the Python ecosystem live and vital. <br><br>Especially PyPI is what surprises any Python newbie. A single repository freely available where to find valuable ready-to-use software, accessible from anywhere, it's hard to believe if you are, for example, a Java or .NET developer. <br><br>But are you aware of the problems that PyPI is currently suffering? It's about two weeks that its searching engine is faulty and doesn't find many packages, even if they are available.<br><br>This is a very bad thing because PyPI is the frontgate to the Python system for many people, more than the python.org site itself.<br><br>I think that PyPI should deserve a special attention for the sake of the whole Python community.<br><br><br><br></span><span style="font-family: Arial;"><br><br>-------- Messaggio originale --------<br>Da:Donald Stufft <donald@stufft.io><br>Inviato:Sat, 05 Sep 2015 18:38:29 +0200<br>A:Steven D'Aprano <steve@pearwood.info>,python-ideas@python.org<br>Oggetto:Re: [Python-ideas] High time for a builtin function to manage packages (simply)?<br><br></span>On September 5, 2015 at 11:40:17 AM, Steven D'Aprano (steve@pearwood.info) wrote:<br>> On Sat, Sep 05, 2015 at 04:08:24PM +0900, Stephen J. Turnbull wrote:<br>> > Steven D'Aprano writes:<br>> ><br>> > > You say "of course", but did you actually look at the python-list<br>> > > archives? If you do, you will see posts like these two within the last<br>> > > 24 hours:<br>> ><br>> > So let's fix it, already![1] Now that we have a blessed package<br>> > management module, why not have a builtin that handles the simple<br>> > cases? Say<br>> ><br>> > def installer(package, command='install'):<br>> > ...<br>> <br>> Python competes strongly with R in the scientific software area, and R<br>> supports a built-in to do just that:<br>> <br>> https://stat.ethz.ch/R-manual/R-devel/library/utils/html/install.packages.html <br>> <br><br>I don't know anything about R, but a built in function is a bad idea. It'll be<br>a pretty big footgun I believe. For instance, if you already have requests 2.x<br>installed and imported, and then you run the builtin and install something<br>that triggers requests 1.x to be installed you'll end up with your Python in<br>an inconsistent state. You might even end up importing something from requests<br>and ending up with modules from two different versions of requests ending up<br>in sys.modules. In addition, the standard library is not really enough to<br>accurately install packages from PyPI. You need a real HTML parser that can<br>handle malformed input safely, an implementation of PEP 440 versions and<br>specifiers (currently implemented in the "packaging" library on PyPI), you also<br>need some mechanism for inspecting the currently installed set of packages, so<br>you need something like pkg_resources available to properly support that.<br><br><br>-----------------<br>Donald Stufft<br>PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA<br><br><br>_______________________________________________<br>Python-ideas mailing list<br>Python-ideas@python.org<br>https://mail.python.org/mailman/listinfo/python-ideas<br>Code of Conduct: http://python.org/psf/codeofconduct/<br>