4

I was installing PyMC3 via Anaconda. The transaction execution was done. Post this action, my Anaconda console closes immediately on open. Unable to import PyMC3 module as well. Below is the error message that pops up before the console closes. I manage to capture a screen shot of it when it momentarily flashed. I have also attached the warning I get when I import PyMC3 module.

How do I resolve this issue? Is there any other way I can uninstall PyMC3 and Theano and install a fresh version?

Edit: And, I tried conda install m2w64-toolchain before running conda -c install pymc3. The transaction was not completed successfully. Still, I went ahead with the second execution. Probably, this is also one reason as to why I landed at this fatal error.

The error message pertaining to Visual studio is as follows:

C:\Users\      >SET DISUTILS_USE_SDK=1
C:\Users\      >SET MSSdk=1
C:\Users\      >SET platform=
C:\Users\      >IF/I [AMD64] == [amd64] set "platform=true"
C:\Users\      >if defined platform (set "VSREGKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0" ) ELSE (set "VSREGKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0")
C:\Users\      >for /F "skip=2 tokens=2.x" %A in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0" /v InstallDir') do SET "VSINSTALLDIR=%B"
ERROR: The system was unable to find the specified registry key or value.
C:\Users\      >if "" == "" (set "VSINSTALLDIR=" )
C:\Users\      >if "" == "" (
ECHO "Did not find VS in registry or in VS140COMNTOOLS env var - exiting"
 exit 1
)
"Did not find VS in registry or in VS140COMNTOOLS env var - exiting"

Update: I resolved the Theano issue by installing m2w64 toolchain via conda. It was due to non-availability of the compiler. The above didn't resolve and was repetitive even after uninstalling anaconda, reinstalling it and even after installing VC++ redist for 2017. The anaconda console was crashing and the message flashed momentarily.

Naive_Natural2511
  • 687
  • 2
  • 8
  • 20
  • Maybe this [conda environment file for installing PyMC3 on Windows](https://github.com/pymc-devs/pymc3/issues/2988#issuecomment-392741283) could be useful. Note, you might try removing the MKL version specification (change `mkl=2017` to just `mkl`) since they expected that to only be a temporary requirement. – merv Dec 26 '18 at 22:15
  • Please don't post code/terminal output in images. See here for why: https://meta.stackoverflow.com/a/285557/2449192 – darthbith Dec 27 '18 at 02:41
  • @darthbith The above isn't code. It's the evidence of error message. – Naive_Natural2511 Dec 27 '18 at 04:06
  • @merv thanks, the issue is solved for me after using `pip install`. – Naive_Natural2511 Dec 27 '18 at 04:07
  • @xkcvk2511 No, but it is terminal output, and as such, should not be in an image. Thank you! – darthbith Dec 27 '18 at 15:09
  • @darthbith so, what way do you suggest to present the error evidence? TIA – Naive_Natural2511 Dec 27 '18 at 16:02
  • Copy and paste the message into a formatted code block in the post. You can [edit] your post to replace the images. Thank you for listening! – darthbith Dec 27 '18 at 18:24
  • @darthbith the console was flashing momentarily. I manage to press the print screen at right time to snip the image. I have manually typed it here. Thanks for the guidance. – Naive_Natural2511 Dec 27 '18 at 18:44

3 Answers3

3

Just had this problem and found a solution. When searching (with Bing or Google) for conda install of pymc3, several links come up. The first is with conda-forge:

conda install -c conda-forge pymc3

DO NOT USE THIS or you will get the error messages in the above posts. I have VS installed for C++ and use it regularly.

Rather, use the installer from anaconda

conda install -c anaconda pymc3

This installer works properly - no silly error messages.

Alternatively, you can use pip install but I prefer conda since this allows me to better manage my python distro's and venv's.

barnwaldo
  • 386
  • 3
  • 8
0

What helped me resolve this was:

  1. Downloading Visual Studio (VS) - community edition found here
  2. Installing & configuring VS for C++
  3. Starting a C++ project and making sure that a C++ compiler is present & working by running "Hello World". Though I think this is optional.
  4. Installing PyMC3 on a new environment in Anaconda.

I found this question while trying to install PyMC3 on a Windows 10 laptop via Anaconda, encountering and searching for the following error message: "Did not find VS in registry or in VS140COMNTOOLS env var - exiting"

AChervony
  • 663
  • 1
  • 10
  • 15
0

Install it from the terminal or cmd prompt as a root user solved the problem for me pip install pymc3 or with 'sudo'

Sai Pe Pu
  • 1
  • 1