5 ms·
I do like Anaconda and it's a really great way to easily get Python on the computers of the people I teach. However, I do have some problems with how they mess
by milliams 9y ago
I do like Anaconda and it's a really great way to easily get Python on the computers of the people I teach. However, I do have some problems with how they mess about with the Python ecosystem. If you read a tutorial on Python modules, it will tell you to `pip install`, create a venv etc.
Anaconda have removed the ensurepip module (part of the standard library since 3.4) which is used during the venv creation to install pip. PEP 453 explicitly recommends that "Even if pip is made available globally by other means, do not remove the ensurepip module in Python 3.4 or later." to ensure that the `venv` module works as expected.
The lack of an `ensurepip` module means that trying to create a venv with `python3 -m venv my_test_venv` gives an error of:
Error: Command '['/home/milliams/my_test_venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
People say that this is ok since `conda` is better but I don't want to have to teach my students the standard tools for Python module development only to have to say "except if you're using Anaconda...". Especially since the really shouldn't have to know what distribution they are using. It should be an implementation detail.
- spot 9y agoconda is the standard tool. tell your students to use it, not venv. problem solved.
- dschep 9y ago> conda is the standard tool. Since when? I was under the impression it's a data science focused alternative to the standard tools(pip, venv module, eventually pipenv).
- metalliqaz 9y agoIt's standard within Anaconda. I think the subtext is that if you have the students install Anaconda, they should use Anaconda tools. If you want standard python, then install standard python.
- ams6110 9y agoIf you're doing/teaching scientific computing with Python, it's widely used, if not "the" standard. Anaconda will almost certainly be available in any current scientific computing environment.
- pwang 9y agoAny cloud computing environment focused on data science or machine learning will have Anaconda installed by default (and for good reason). The sheer amount of complex dependencies and possible errors between build-time configuration and run-time libraries is vast. Anaconda helps people steer clear of a large amount of them, and that is why it's so popular.
- fredley 9y agoThis situation is exacerbated by the fact that, for Windows, Anaconda is the only way to get packages like numpy etc. working without downloading prebuilt wheels. If pip on Windows worked reliably Anaconda would have no need to exist.
- BeetleB 9y agoTo be honest, I never needed Anaconda to use NumPy/SciPy/matplotlib/pandas on Windows. I get that Anaconda makes it easier for people new to Python. But for seasoned Python folks, there's really no headache. NumPy (and I think SciPy) used to be standard Windows installs (as in download an exe and install it). Pandas was too, but now you can use pip. The only catch was that you should install 32 bit python instead of 64 (not sure if that's still the case).
- lyricat 9y agoNot true. Anaconda/miniconda also provide a convenient way for package control which include binary packages and source code packages For me, condo is good solution to install necessary dependences with little pain.
- profalseidol 9y agoglad java doesn't have this problem 99.9%. even if you teach very old java. it would still work today.
- RayDonnelly 9y agoWe have put `ensurepip` back in place and uploaded new Python packages for all platforms. `conda update python` should see you right. Thank you for bringing this up.
- milliams 9y agoThanks Ray, it's very much appreciated!