Skip to content

DOC: Windows Installation Instructions Update #6413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tytrzecki opened this issue Dec 26, 2022 · 5 comments
Closed

DOC: Windows Installation Instructions Update #6413

tytrzecki opened this issue Dec 26, 2022 · 5 comments
Labels

Comments

@tytrzecki
Copy link

Issue with current documentation:

I ran into much trouble trying to install PyMC on my windows 10 machine. I believe the installation instructions should be updated as described below from @sreedat post on Aug 21, 2021, and maybe expanded upon.

Idea or request for content:

@twiecki After posting this I could make my pymc3 work without installing m2w64-toolchain in the first place any where, either the base Anaconda or one of the envs. Here are the steps I followed.

Downloaded the latest 64-bit RTools from this page https://cran.r-project.org/bin/windows/Rtools/ and installed it with Admin rights so that the mingw compilers are on the System PATH and also First on the PATH. I installed RTools to the default location installer prefers C:\rtools40

Note: RTools on WIndows has to be installed in directory paths without any space in the directory names.

Restarted the machine.

All of the next steps are in Anaconda.

Used the following command to create a basic environment:
conda create -n pm3env -c conda forge "python=3.8" libpython mkl mkl-service numba scipy python-graphviz

conda activate pm3env

pip install pymc3==3.11.2 (I'm running everything with Admin rights)

(pm3env) C:\Users\SreeDatta> which gcc and then which g++ (to ensure C:\rtools40\mingw64\bin is referenced as the primary C and C++ compiler.

(pm3env) C:\Users\SreeDatta>conda install -c conda-forge blas libblas (I did this a preemptive install. I got tired of seeing the invalid register theano error.

For reference these were the versions `installed:
blas 1.0 mkl conda-forge
libblas 3.9.0 1_h8933c1f_netlib conda-forge

After this step, I stalled jupyter using conda install -c conda-forge notebook as that is my preferred way to interact with pymc3

Then I could run the basic and some advanced hierarchical models without the theano-pymc error.

I do not know how long this working environment will last. I also verified that on my WSL Ubuntu as well as my dedicated Ubuntu laptop, I've gcc 8.3.0 - compared to Windows 10, Linux / Ubuntu has been a breeze, but all of my team members work on WIndows 10 and I needed to get a decent Windows 10 environment for pymc3.

I will post more here as I see what happens with different users.

@tytrzecki tytrzecki added the docs label Dec 26, 2022
@twiecki
Copy link
Member

twiecki commented Dec 26, 2022

Glad you got it to work. I'm more curious into PyMC 5.0.1 installation under windows. That should work without anything else. Could you give that a try?

@tytrzecki
Copy link
Author

What version of python is appropriate to use for version 5?

@twiecki
Copy link
Member

twiecki commented Dec 26, 2022 via email

@tytrzecki
Copy link
Author

Sorry for the multiple messages. To add I actually modified sreedats steps slightly. I created the environment with the following command:

conda create -c conda-forge -n pymc_env "pymc>=4" python=3.7

I did not need to run a pip install for PyMC (the version that was installed is 4.1.4), but I did run:

conda install -c conda-forge blas libblas

After running that and installing jupyter-notebook it began working. It seems like it was python version issue maybe, or it could have been that because I hadn't installed jupyter-notebook in that environment that it was calling it from outside of it and therefore was not pointing to the correct location for the installation. I apologize if thats confusing, I'm relatively new to this.

I was just able to install PyMC verison 5.0.1 by running the following commands:

conda create -c conda-forge -n pymc5 "pymc>=4" python=3.11

conda activate pymc5

I then stumbled around installing jupyter-notebook and adding a pymc5 environment, but not sure how necessary that was to it working:

conda install -c conda-forge notebook

conda install -c anaconda ipykernel

python -m ipykernel install --user --name=pymc5

So it seems like it was probably user error. I apologize for taking up your time! Thanks for getting back to me so quickly though!

@twiecki
Copy link
Member

twiecki commented Dec 27, 2022

Glad it's working for you! The step with blas should not be required.

@twiecki twiecki closed this as completed Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants