Procedure for installing pymc outside of conda environment

I installed PyMC v5 on my machine and it doesn’t work. I’m getting an error when I import the package:

NoSectionError: No section: 'blas'

It appears that this is because I installed PyMC outside of a conda environment. I don’t want to use conda because of the bloat and was able to run PyMC3 perfectly fine just using pip install right up until I upgraded to v5.

Please point me to a resource how to install the latest Pymc version using pip without a virtual environment.

Hi @matsuo_basho, I’m new here but I was also struggling to install PyMC. In the end I opted to using conda as it just seemed easier than troubleshooting all the issues.
So far it seems that you don’t have the required BLAS (Basic Linear Algebra Subprograms) libraries installed on your system.

I would suggest you checking if you have BLAS installed and if not, to install them. :slight_smile:
To check and install BLAS will depend on your OS. But it should be fairly easy to find instructions online (asking chatGPT for example, it can be very helpful in troubleshooting installation problems)

My understanding is that the “requirement” of conda is to leverage the packages on conda-forge, the most difficult of which is the C compiler toolchain (which BLAS is a part of). As @guin0x mentions, you can probably install all the necessary pieces manually, but you are going to need to figure out how to do so (platform dependent) and updating in the future is likely to be problematic (because you only have the single environment to work with). If you don’t like the bloat of conda, I would suggest checking out either miniconda (minimal install of conda) and mamba (a drop-in replacement for the conda application itself reimplemented in C for speed) or micromamba (a full replacement for conda by the creators of mamba). Not having the ability to create fresh environments one way or another is going to cause you trouble at some point.

1 Like

Thanks for the guidance. I do create virtual environments but I prefer to use pipenv. Please let me know if there are any pointers for installing pymc using pipenv. Thanks.

pipenv works for environment management. But you’re still going have to manually install/configure all the dependencies because you won’t have access to the ingredients available on conda-forge. Someone might have experience installing everything by hand (and, again, how to do so is going to be platform-dependent), but I don’t.

my tip is just to try it head-on :stuck_out_tongue: as you saw, you will get warnings if something is off and then you can fix issue by issue as they come; start by trying to install the BLAS library and see if the error/warning change. :slight_smile:

1 Like

I tried doing it manually but didn’t get far, so just installed it in Miniconda and it works. Thanks for the advice.

2 Likes