Is there any simple install for pymc V4?

Hi. I am running a course and would like to have my students use pymc v4 in Jupyter notebooks. I have experimented with my own Windows 10 environment and think I can work out how I might get pymc v4 to work with Jupyter, but the process was less than simple. Fundamentally, the complexity of dealing with environments, on various operating systems the students are using and with various still levels of working with scripts is just a show stopper.

Is there any simple way to install and run pymc v4 with one of two lines of conda commands for example? Or, should I just have my class work with pymc3 until a more straight forward install exists for pymc v4?

I can see that pymc v4 is a nice step forward and a lot of work has gone into it.

The installation guides on the wiki (windows | mac | linux) give one-liners in conda to install PyMC. These are what I always follow when I need to start a new environment.

I am currently teaching a class where I am introducing students with very limited computer science backgrounds to scientific computing in Python. What worked quite well for me was to distribute a .yml with all the packages needed for the course to all the students. Then all they needed to do was download miniconda, save the .yml to their home directory, and run conda env create -f env_name.yml.

Another alternative is to have the students use Colabs. As of very recently, PyMC now comes installed by default when you launch a new Colab instance. This would avoid the headache of installations and platform wrangling altogether.

1 Like

Thanks for the quick and helpful response!

I should have been more specific. The conda install is not the problem, it is this second step that seems to cause problems for simple use of Jupyter notebooks:" conda activate pymc_env

The idea of using Colab is a great one! This could well be the path of least resistance; and least IT support time that I do not have for me. Thank you.

My students are generally quite good at using Python. I have been really happy having moved the Bayes model lessons of my course from Stan to pymc3. Often with Stan, I had to extend deadlines and do a lot of one-on-one help because of the model definition language. With pymc, my students can focus on the new Bayes modeling concepts and not on dealing with syntax of an unfamiliar language.

Sounds like Colab might be the way to go. I’m still curious why activating the environment causes problems if the conda install worked though? That suggests to me the conda install didn’t work.

I think I agree with you about using Colab

On my WIndows 10 machine with standard Anaconda the activate script did not exist and I had to know to use activate.bat. init the environment, etc. Then I needed to make a new instance of the entire Anaconda distribution to get Jupyter to run in that new environment.

Maybe I am doing this all the hard way, but my experience was far from turnkey. This said, would be happy if someone told me that I was doing this all wrong and there is a better way:)

This sounds like a $PATH issue to me. But it’s hard to diagnose without additional information. Colab is a great solution for teaching.

Thanks for the suggestion about path. I also considered a path problem. I actually checked the scripts directory and there is no activate script.

Huh. So that seems like conda wasn’t installed correctly. Weird.

For what it’s worth, I strongly suggest using miniconda + mamba over “normal” anaconda. I had a lot of problems with anaconda until I made that switch. Plus the anaconda navigator is basically bloatware imo.

1 Like

Seconded. I have been using micromamba and have been very happy with that as well.

1 Like