News for hackers. Stuff that matters.
Re:Python's New Package Landscape by prepend on Thursday October 18, 2018 @08:35AM (#18247741)
Am I weird that I use anaconda instead of virtualenvs? I guess it’s overkill if you aren’t using the other conda features.
Re:Python's New Package Landscape by tomkinstinch on Thursday October 18, 2018 @09:46AM (#18248236)
It's worth mentioning that the package manager component of anaconda is released as a separate (small) install: miniconda[1]. It includes only Python and the package manager, and not all of the 700+ packages installed as part of a full anaconda installation.

With its ability to install Python and non-python packages (including binaries), conda is my go-to for managing project environments and dependencies. Between the bioconda[2] and conda-forge[3] channels, it meets the needs of many on the computational side of the biological sciences. Being able to describe a full execution environment with a yaml file is huge win for replicable science.

1. https://conda.io/miniconda.html https://conda.io/docs/user-guide/install/index.html

2. http://bioconda.github.io/

3. https://conda-forge.org/

Re:Python's New Package Landscape by azag0 on Thursday October 18, 2018 @08:48AM (#18247835)
It is an overkill for pure-python packages or packages with simple C extensions. Conda was developed specifically to handle non-python dependencies, which would be difficult to build in setup.py.

Also, a conda package is not a replacement for a distutils/setuptools package. When building a conda package, one still calls setup.py. So every python conda package has to be a distutils/setuptools package anyway.

Re:Python's New Package Landscape by 131012 on Thursday October 18, 2018 @09:02AM (#18247930)
Thanks for caveat. Nonetheless, anaconda makes my life so much easier when working with python libraries. If anybody got any other reasons to be careful of it, I'm interested!
Re:Python's New Package Landscape by flatfilefan on Thursday October 18, 2018 @09:42AM (#18248207)
If you need to work with cutting-edge python tools (e.g.from GitHub) it’s often easier to use virtualenv to control the versions you need installed.
Re:Python's New Package Landscape by dagw on Thursday October 18, 2018 @09:55AM (#18248318)
conda environments support pip and arbitrary pip commands. So if you use pip to for example install a specific version of a library directly from github that information will be stored in your conda environment and be reproduced every time you recreate your environments.
Re:Python's New Package Landscape by rhizome31 on Thursday October 18, 2018 @08:49AM (#18247840)
It seems that Anaconda is under-appreciated outside of pydata circles. Before using it I had no idea that it could manage virtual environments, dependencies and different versions of python.

The fact that it's not a community-driven project might be one of the reasons.

Meanwhile, in a galaxy far away, people are also using buildout.

Re:Python's New Package Landscape by sirn on Thursday October 18, 2018 @10:33AM (#18248604)
I have been revisiting buildout recently and I wish there's something that merge ease of use of pipenv with buildout concept. Perhaps something similar to Nix throw in the mix, but more specific to a Python project. I heard that I can do this with Conda, but I never tried.

Being able to define and install external dependencies (e.g. ImageMagick, libsodium, etc.) from a configuration file local to a project is something I missed the most, especially when I'm working on several projects at once.

Re:Python's New Package Landscape by andersriutta on Thursday October 18, 2018 @05:59PM (#18252525)
> Perhaps something similar to Nix throw in the mix, but more specific to a Python project.

Any examples of how Nix itself doesn't do what you need? One example I can think of: Nix doesn't support Windows.

https://nixos.org/nixpkgs/manual/#python

Re:Python's New Package Landscape by sirn on Friday October 19, 2018 @06:25AM (#18255592)
Nix does everything I want, but I find it hard to convince friends and coworkers to try out Nix. I think this is partly due to Nix itself not belonging to the Python's ecosystem, so the barrier is higher than say, "Yeah, Pipenv is just Virtualenv+Pip"
Re:Python's New Package Landscape by neves on Thursday October 18, 2018 @11:41AM (#18249250)
I think Conda is the way to go, because:

- there is Miniconda that doesn't force you to install all PyData packages. - virtual envs and needed packages are all defined in simple yaml file. - it works well with pip. So if a package isn't in Conda repository, you can install from pip. The annoyance here is that you must try conda, fail, and then try pip. - you can easily clone envs. So you can have some base envs with your usual packages (or one for Python 2 and another fo Python 3), and just clone them to start a new project.

Re:Python's New Package Landscape by Insanity on Thursday October 18, 2018 @09:47AM (#18248248)
I tend to only use anaconda for "data science work" and not for my small side projects.

I "feel" like it is overkill to use anaconda for things unrelated to 'data science' and the likes, but I'm not sure why I feel that way.

It kind of makes sense to use for other projects as well since you don't need to import all the things conda offers.

Re:Python's New Package Landscape by azag0 on Thursday October 18, 2018 @10:02AM (#18248363)
For one, as a package developer, publishing a source distribution of a package on PyPI is almost trivial. Publishing on Anaconda Cloud requires you to build the binary packages on all the OS's that you want to support (and for all Python versions you want to support) which most people delegate to some CI. So there is a whole new level of complexity involved.
Re:Python's New Package Landscape by xapata on Thursday October 18, 2018 @11:38AM (#18249201)
You can use pip-install from within a conda environment. Conda isolates better than virtualenv does, IMHO.
Re:Python's New Package Landscape by mfe5003 on Thursday October 18, 2018 @10:33AM (#18248607)
When I have used it, and I have to for a certain project, it is incredibly slow to resolve depenendcies. Enough so that I go for a walk or do something else for 15 minutes while it thinks about whatever it's doing.
Re:Python's New Package Landscape by goerz on Thursday October 18, 2018 @06:56PM (#18252944)
Yeah, this is becoming a real problem. This didn't use to happen, but now conda is slow to the point of being unusable if you need to create environments a lot (like during testing)