Hi All
I have been trying to get a working environment on a Windows 10 machine with Anaconda3 (64-bit) for both Pymc3 and Bambi. I have a working environment for Pymc3 (a nightmare to get this right until Pymc3_v4 is fully ready) but cannot get Bambi to work on top of Pymc3.
Do any of you have an environment.yml file you can share here which is working for you with both Pymc3 and Bambi on Windows 10? I have successfully tested both of these packages on Ubuntu 20.04 LTS and on Windows 8.1. The environment that works in Windows 8.1 does not work for Pymc3 and Bambi on Windows 10. I have been testing and trying many different configurations without success.
Any help would be greatly appreciated.
Sree
2 Likes
Hi,
I can’t help you with Windows 8, but our Installation Guide (Windows) also includes an environment.yml
file.
I am not familiar with Bambi though. Maybe @aloctavodia can help?
One thing to watch out for on Windows are compilers in the PATH. If you have things like Anaconda, MinGW installed the global ones may take precendence over the ones from the environment, thereby breaking it.
@michaelosthege thanks for the quick reply. I have good working installations for both Windows 8.1 and Ubuntu 20.04. Bambi is a really nice wrapper around Pymc3 to specify Fixed and Random effects with a formula specification. It emulates the Brms package in the R-Stan universe which simplifies hierarchical / multilevel model specification significantly for non-programmers such as myself.
I’m beginning to suspect the global compilers may be the issue as you pointed out. I use RStan and Greta in the R environment and compilation of RStan models is done with RTools which houses gcc-mingw compilers and they appear first in the path.
Is there a way to specify through named variable paths, the exact compilers Anaconda Python should be using? Thanks again for taking the time to help.
Sree
1 Like
@sree_datta also check Compilation failed (return status=1) · Issue #4922 · pymc-devs/pymc3 · GitHub where a similar discussion is taking place.
I guess one could modify the os.path
before importing theano/pymc3, but that’s not really solving the problem.
1 Like
@michaelosthege thanks for this link/reference. I found this discussion helpful. I’m trying different RTools and Anaconda configurations to see if I can get the correct environment without the mingw
compilers clashing. What is puzzling for me is that I have only updated my Anaconda and R tools. I did not change anything that I had done before. The silver lining in this frustrating endeavor has been the wonderful support of Pymc3 and Bambi developers and users.
1 Like
Thanks @michaelosthege for the suggestion that my Windows 10 machine may be having a clash of mingw
compilers. As I mentioned earlier I use both R and Anaconda for my Statistics and Data Science work.
The Bayesian models I work with in R uses the Stan packages that need C and C++ compilers (via RTools that uses the mingw C and C++ compilers through Msys2). In the System environment variables, RTools is first on the PATH.
@michaelosthege had posted his USER Path variables and that showed that my Python compilation was not using m2w64 tool chain
in Anaconda, but was using the compilers from RTools.
So I changed the name of the RTools folder and ensured that the System PATH variable would not work and the these mingw compilers could not be found. Then when I ran a simple command import theano as tp
it gave me an error Error: g++ cannot be found...
Next I set up my User PATH variables and pointed them to the correct location of the mingw compilers in the Base Anaconda3 installation. All of my Pymc3 models are being compiled correctly.
Thanks everyone for your time and your help - Sree
3 Likes