[Repronim-trd3] Best way to determine conda architecture?
Yaroslav Halchenko
yoh at onerussian.com
Sun Mar 4 21:11:15 PST 2018
On Mon, 05 Mar 2018, Robert Buccigrossi wrote:
> Dear Niceman Gurus,
> To address #195, I'd like to find the conda architecture. Of course, the
> trick is how :)
> *Option 1: Getting the platform from "conda info -a"*
> The command "conda info -a --json" does report the "platform" (like
> "linux-64") so
I would have tried on different deployments (e.g. 32bit miniconda as
well) to just rule out it being system's platform.
another option is just to ask conda's python:
$> ~/anaconda-4.4.0-3.6//bin/python -c 'import platform; print(platform.architecture())'
('64bit', 'ELF')
but hopefully it is the same as option 1 and that one could be used.
> *Option 2: Getting the architecture from conda's conda-meta JSON entry*
> I can see the architecture in the JSON file for the "conda" package in
> the "conda-meta" directory (specifically in my recent install I see that
> conda-meta/conda-4.4.10-py27_0.json has "arch": "x86_64") . So I know that
> I can use:
> conda list --json -f conda
> to get the "dist_name" (which on my system is "conda-4.4.10-py27_0"), and
> then use that to construct the json filename and read it from conda-meta to
> get the arch.
> Is there any preference? Left to my own devices, I'd grab the platform
> with Option 1...
> Butch
--
Yaroslav O. Halchenko
Center for Open Neuroscience http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419
WWW: http://www.linkedin.com/in/yarik
More information about the Repronim-trd3
mailing list