I need to use QuSpin in python. The official guide instructs to install it with Anaconda. This does not seem to be available as a package in PyPI.
This suggests not to use such manually installed python packages. Is there any way to install QuSpin “the Arch Way” (or Manjaro way)?
Is it possible to make a python-quspin AUR from the anaconda package (I would be happy to maintain it, if someone helps me to write a PKGBUILD), as it is easily possible with packages in the PyPI ?
Also, I installed anaconda from the AUR. Is it safe to run it with sudo? Otherwise, is there any way to install anaconda packages without touching system python packages (e.g. something like pip install --user packagename )
Why do they explicitly need Anaconda? I recommend using the system’s python package, create a virtual environment, don’t forget to activate it, and then install the requirements with pip.
However, apparently (and for god why?) they don’t publish the package in PyPI, so you have to install from source and also the dependencies. Fortunately, they have instructions:
There might be more system dependenices, at least boost and boost-libs are required: pamac install boost boost-libs
Probably because this is meant to be used in clusters where the users may not have root access, and Anaconda does everything for you. But I intend to use it in my personal computer to learn how to use it.
I have never used virtual environment so far, and have some questions.
Can I access the system python packages (e.g. python-gtts) within the virtual environment without installing them again with pip?
What does CFLAGS do?
I don’t want to save my code inside the virtual environment directory. How do I call the python in virtual environment to run my code? Do I first activate the virtual environment and then run python code.py ?
I don’t know anything about this package. It is most likely a research project, so in experience (and my own research projects ), the code structure, documentation, and installations are terrible.
You can’t access the system packages, that’s the purpose of the virtual environment, you have to install everything (again) but this time, directly with pip.
In the virtual environment, everything is local, so no root or sudo needed. It would even be harmful to use them.
The CFLAGS are for the compiler, I tried installing and it is still compiling but it complained that this variable was empty (again, bad code in research projects).
I tried to compile it with the --omp flag, and after ~30 minutes it showed compilation terminated with the error
/home/archisman/QuSpin/quspin/basis/basis_general/_basis_general_core/source/bits_info.h:5:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
5 | #include "boost/multiprecision/cpp_int.hpp"
It seems that as a workaround, I would have to install conda in the home directory (rather than from the AUR, which installs in opt, and is somewhat inconvenient). It is supposed to be self contained, and won’t affect system packages.
There is the following GitHub issue to publish it to pip, but it has not attracted much attention.
I can’t help with that, for me it compiled and I can import the library. However, I didn’t test any actual computations because I don’t even know for what the library is used for.
Yes, look at a few examples of PKGBUILD files in the AUR that provide third-party python packages (e.g. python-matplotlib-git), then you’ll build it and you’ll end up with an “installable” file for pacman.