You are not logged in.
My job requires me to use anaconda and i would like to install it. So far all the packages I have needed have either been official repo packages that I can just
sudo pacman -S packagename
or just easy/harmless things to install from AUR that I can just use yay.
I have heard that Anaconda messes with some sort of path when you install it/want to use it and generally can conflict with lots of things. What would be the best way to install it safely, the full process? In Anaconda itself you can create these things called encironments where when you install something it doesnt mess with anything else and it is very easy to delete that environment and everything in it in an instant. Is there an equivalent for this in Arch for installing anaconda itself? I know it is on AUR. Will simply running
yay -S anaconda
work and not mess with anything?
Edit: once I do install it, what is the sfae way to use it? I am asking these questions because from what I read on he internet anaconda is quite likely to break lots of things if you just simply execute the yay command i gave above
Edit 2: https://wiki.archlinux.org/index.php/Py … nvironment
I have been reading that page many times, but can't discern if this is the way to go and whether you can actually install anaconda itself in a venv or only Python packages
Last edited by newguy778 (2019-10-07 08:12:48)
Offline
What would be the best way to install it safely, the full process?
Since the package is only available in the AUR, you either trust the developer to have correctly packaged it via the respective PKGBUILD or you don't.
In the latter case, you can download a snapshot from the PKGBUILD and modify it or create your own from scratch.
Then build it via makepkg and install it via pacman -U. That's about it.
Last edited by schard (2019-10-07 08:29:34)
Inofficial first vice president of the Rust Evangelism Strike Force
Offline
I have installed anaconda in the past via yay. Anaconda defaults it's installation to /opt including its own python environments. This can be a problem because /opt requires root permission to write to. As shard said, it might be better to create your own PKGBUILD and dictate where your environments are going to be.
Offline
Installing anaconda as a system package seems like bad idea to me. My recommendation is avoid anaconda if at all possible, but failing that, download the installer as an unprivileged user and install it to that user's home directory. Decline the option to add the conda activate call to your shell init files, and just source the activate script (`. $installdir/bin/activate`) manually whenever you need to run something in conda.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Online
My recommendation is avoid anaconda if at all possible
Out of curiosity, why?
I've basically shifted all my python environments from venvs to conda environments, and really like doing it this way. I install anaconda as an unprivileged user and directly symlink only the conda executable to ~/.local/bin so I can activate/deactivate as necessary (within environments everything else becomes available).
Definitely would NOT recommend system install of anaconda, it's meant to be a package manager for your python stuff, so treat it that way. Similar to how I would not recommend using pacman for installing python virtualenv stuff.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Because to me, anaconda is just a way of giving users the ability to install the software they need on systems that they otherwise wouldn't be able to install software on (i.e. HPCs). I'd recommend writing a PKGBUILD (basing it on the conda recipe if necessary & available) and using native package management over a secondary package management system.
There are other cases where using conda (ideally Miniconda rather than Anaconda) makes sense, notably when you're working with a group and you just want to be able to set up and export your environment for others to import, or you need to have multiple versions of packages installed for processing different datasets.
When conda is used, my current advice is to 1) use a python3-based conda install (py2 installs don't seem to be tested upstream -- the latest repo and package format changes certainly caused a lot of trouble), 2) never touch base -- create envs to install the packages you need, 3) keep envs as minimal as possible -- the more packages you install into one, the longer dependency resolution will take (it's slow enough at the best of times...), and the more likely it is that it'll break during an update (and debugging a broken conda env is Not Fun™).
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Online
Hi,
Sorry to piggyback on this thread but I'm in the same boat: need conda envs for science stuff (because MKL etc.) but don't want to compromise my Arch Experience. I wonder what OP chose to do or if anyone can help clear things up a bit.
I grabbed the shell script for miniconda and ran it in $HOME (didn't use the AUR packages because of the same concerns). I declined to run conda init and symlinked ~/miniconda3/bin/conda into my local script directory (on PATH), and a few things work (conda env list, etc.) but I can't activate envs.
Checking conda init --dry-run, it seems that conda basically prepends the whole of ~/miniconda3/bin to PATH (the rest is stuff to modify the shell prompt) and I guess that's the bit that causes problems? They have their own pip binary in there for example.
Is there a better way to do this?
I install anaconda as an unprivileged user and directly symlink only the conda executable to ~/.local/bin so I can activate/deactivate as necessary (within environments everything else becomes available)
Which binary did you link to?
Offline
I installed anaconda once and didn't like it because I started having problems with file and directory permissions. I would avoid using it.
Now I just write my own PKGBUILD for the python modules I need. It's far simpler, cleaner since pacman keeps track of them, and it avoids using pip.
It's not at all complicated to write the PKGBUILD's. Just grabbed one of the python ones in AUR as example and just followed the logic of it. As long as the source files are available of course and I assume all if not most of what anaconda offers are available from source.
Offline
Alright thanks for the heads up. Just took a peek at the AUR again and it seems that at least some of what I need has been packaged already, e.g. [1]. I was concerned about handling other dependencies like C/FORTRAN etc. which conda can handle, but PKGBUILDS probably work too... It's just a bit intimidating since I've ony been on arch for about a week
Some context, to be completely transparent about my concerns: this reddit thread and this post/article.
Specifically, conda provides the Intel Math Kernel Library (or binaries compiled with it?) and cuDNN (a deep neural network, haven't actually used this). I also get access to convenient channels/repos for "science" oriented (read: poorly packaged) software, which could apparently be hard to build on my own.
Before, I used to make new conda envs for each project (this is often recommended in python courses or by professors etc). It was probably redundant most of the time, but on the odd occasion it could be useful. Do you suggest virtualenv and friends for this? ( I suppose this is a whole other debate... )
Anyway, time to read up on AUR helpers for the Nth time
Offline
Offline
Specifically, conda provides the Intel Math Kernel Library
If your main goal is to do science stuff I really see no point in using conda just to have IMKL.Why not directly download fftw, lapack, blas, fishpack, cfitsio, etc into /opt/, configure and compile there ? That is what I always do myself.
Edit: in fact if you don't mind having a some performance drop, you can directly install some of them (blas, lapack, fftw) with pacman as shared libraries.
Last edited by fistrosan (2020-08-15 16:36:55)
Offline
in fact if you don't mind having a some performance drop, you can directly install some of them (blas, lapack, fftw) with pacman as shared libraries.
I'm not sure why you say there will be a performance drop and I'm also not sure also why you say pacman would treat them as shared libraries. If as you suggested to configure and compile these libraries manually, then there's not much difference if I write a PKGBUILD that does exactly the same.
What I believe pacman does is simply keep a good record of what is installed including their dependencies, to easily track newer packages, synchronise updates to avoid partial updates, and to cleanly delete them when you want to do so. How can there be a performance penalty?
Offline
Correct, there is no much difference between PKGBUILD/AUR and downloading and compiling yourself. Except that with PKGBUILD you will need to do more editing of the makefile.
But with pacman is a different story: pacman will install precompiled libraries and binaries. As such, the flags used in the compilation will be intended to work in a wide variety of cpus. If you download the package and compile it (yourself or via the AUR) you can optimize those flags and compiler options. For instance, if you compile lapack in an intel chip using icc or ifort (intel compilers) you will inmediately gain a 20 % performance as compared to gcc/gfortran (which is most likely how libraries in the arch repos were compiled). Similarly the compiler flags will be set to -02, but if you compile yourself you can go for -O3 or -fast-math and you will have even better performance.
But something tells me that performance is not your concern because it seems you want to program mostly in python (?) ... so maybe I am just talking nonsense as your primary goal might just be convenience and ease-of-use in which case of course python is the better choice.
Offline
@fistrosan Thanks and yes you're partly right I like convenience and ease but I also think pacman is great. It's one reason I use Arch.
I would assume it is possible to write custom PKGBUILDs that would aim the optimizations but as you said it would require more editing.
Offline
Thanks everyone for the detailed discussion. I'm convinced about managing this stuff through PKGBUILDs or from AUR instead of conda.
If you download the package and compile it [...] you can optimize those flags and compiler options.
This is the other thing that conda used to do for me (I think). I guess I would look for these in the package docs, right?
The intel-mkl PKGBUILD that loqs linked uses gcc-fortran, as you guessed. Maybe I will just use that for now, until I learn more about compilers etc. With pacman, it should be relatively painless to remove it later so I can recompile with an intel compiler/manual flags.
Offline
Last post, since I've already derailed this thread too much...
Just in case anyone came here for MKL and Numpy stuff like me, if you want to do it "the Intel way" (note: beware messy licensing situation, see https://wiki.archlinux.org/index.php/Intel_C%2B%2B) then the instructions are at
https://software.intel.com/content/www/ … l-mkl.html
I've decided to stick to just using intel-mkl from the community repo (link in post by loqs 2020-08-15 22:17:49) and pyhon-numpy-mkl from AUR (see my earlier post). OK that's all sorry again for not starting my own thread earlier.
Offline