3

I want to plot few graphs with matplotlib and I have a windows machine Firstly I need to install, so I download the file from http://matplotlib.org/downloads.html . Well, when I tried to run, it throws a pop up saying it failed to find the version 3.4 in registry. This is a bit strange because my python version is 3.4.1.

Of course, I did search through the forum. I happened to look into numpy python 3.4.1 installation: Python 3.4 not found in registry which is same as my problem. but my first question:

1) The matplotlib official page gives me a direct link to install ".exe" for windows with python version 3.4. If this is true then why this problem should occur in the first place.

2) My second question, how one can actually find whether the downloading package version is the right match for the current python version installed on local PC.

Community
  • 1
  • 1
Sangamesh Hs
  • 1,447
  • 3
  • 24
  • 39

4 Answers4

4

The windows .exe installer should work for all sub-versions of a given Python installation, this means that if you use the 3.4 installer it should work for 3.4.0, 3.4.1, and 3.4.2.

You need to check that you are using the correct version of the installer, 32-bit or 64-bit. The installer should match the Python version you are using, which may or may not match your system version. This is to say that if you had a 64-bit system and used 32-bit Python, you should use the 32-bit installer.

If it still doesn't work, I'd suggest you re-install Python and try again, it's possible that something has messed with your registry settings.

Originally I thought that the sub-version mattered, but in fact it does not. I raised an issue with matplotlib here and was corrected by Christoph Gohlke who maintains the .exe installations.

Incidentally (for someone reading this in the future as you know yours) if you need to find your current Python version you can simply type python -V in the command line and it'll return the details, for example mine returns:

Python 3.4.0

Ffisegydd
  • 51,807
  • 15
  • 147
  • 125
  • Nicely explained. Thanks. Well, if you look into the link http://matplotlib.org/downloads.html , you will find the section latest stable version. In this section under windows you will also find, **matplotlib-1.4.2.win-amd64-py3.4.exe**. With this I understand, **matplotlib** is version 1.4.2 supporting any version of python in series **3.4**,like it might be **3.4.0**,**3.4.1**,**3.4.2**. Is that right? – Sangamesh Hs Oct 29 '14 at 16:38
  • +1 You are right. Thanks for posting this issue on github. Now upgrading my python to 3.4.2 :) Thanks – Sangamesh Hs Oct 29 '14 at 16:44
  • This seems to me like an issue with the installer rather than matplotlib itself. A build of matplotlib against 3.4.0 should be binary compatible with 3.4.1. Most likely, it is the installer that needs to be fixed to not bork on bugfix version differences. – Ben Root Oct 29 '14 at 17:13
  • @BenRoot Thanks for your comment. Well, I believe **Ffisegydd** mentioned was right, because I installed python 3.4.2 and then installed the matplotlib library and it works fine...I guess the installer on matplotlib download site is for the version 3.4.2 only...Again its just a guess !! – Sangamesh Hs Oct 29 '14 at 19:29
  • 1
    @SangameshHs After speaking with the maintainers (you can find the conversation on the issue) it turns out that the sub-version does not matter. I don't know why upgrading to 3.4.2 fixed it for you, but I'm glad it did. It's possible you had the incorrect bit-version (32 or 64) originally and your upgrade fixed it. In any case, I have edited my question to take into account the information from the issue. – Ffisegydd Oct 30 '14 at 09:16
  • @Ffisegydd Great. Good to know. Appreciate your effort!! – Sangamesh Hs Oct 30 '14 at 10:35
3

I had the same problem installing matplotlib-1.4.3.win-amd64-py3.4.exe on python 3.4.3: version 3.4 not found in registry. Looking in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\ there was no Python key, so matplotlib is right.

Further searching I found this SO article, Installing SetupTools on 64-bit Windows, that provided a registry script to add the necessary keys for Python 2.7. I modified the script for 3.4 and added the keys to the registry. Install of matplotlib then completed successfully. It seems the registry keys didn't get added when I installed Python 3.4.3 (sub-installer that installs registry keys is invoked at user privilege level??).

The modified registry key file I used. Save it to a text file with a .reg extension.

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Python]
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore]
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.4]
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.4\Help]
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.4\Help\Main Python Documentation]
@="C:\\Python34\\Doc\\python343.chm"
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.4\InstallPath]
@="C:\\Python34\\"
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.4\InstallPath\InstallGroup]
@="Python 3.4"
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.4\Modules]
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.4\PythonPath]
@="C:\\Python34\\Lib;C:\\Python34\\DLLs;C:\\Python34\\Lib\\lib-tk"

Then double click the .reg file to add the registry.

Community
  • 1
  • 1
dfahammer
  • 31
  • 1
0

I had this problem with Python3.4.2 and went back and did a reinstall. This time I paid attention to what I was doing. While installing Python3.4.2 (or 2.7) a list of options popup. The last item on the list of options is "Add Python to path". On my installation this option was marked with an X and I assume it was on the first installation. I removed the X and continued the install of Python. When I installed numpy, it found Python in the registry and loaded okay.

Sam
  • 1
  • 1
0
  • Open regedit.
  • Find python in HKEY_LOCAL_MACHINE.
  • Export it to some location on your hard drive.
  • Open the exported file in any editor.
  • Replace all HKEY_LOCAL_MACHINE with HKEY_CURRENT_USER and save the file.
  • Now just double click on the .reg file to add this key to registry.
  • If you go back to the registry using regedit, you will find python in HKEY_CURRENT_USER as well.

I really wish 'pip install numpy' worked just like it did for python 2.7.

Vikas
  • 1,900
  • 1
  • 19
  • 20