Monday, 3 January 2011

PyYAML on Windows 7 64 bit (Python NLTK) PyYAML python required not found in registry

Catchy blog title huh?

So, I needed to use the Natural Language Toolkit. (http://www.nltk.org/)

To do this, following their instructions, you will need to download the following items:

NLTK: http://nltk.googlecode.com/files/nltk-2.0b9.win32.msi, http://nltk.googlecode.com/files/nltk-2.0b9.win32.exe

The problem is, when python installs it does not enter any registry keys. Then, when you try to install 
PyYAML, you will get the following error:

PyYAML python 2.6 required not found in registry

To fix this we need to enter the correct values in the windows registry. Follow these steps to do that:

click the start button, type "regedit", and click ok to open regedit. Enter the keys below:

To add a new key, navigate, in this case to HKEY_CURRENT_USER\Software\ then right click software and choose new->key then type the name

You dont need to add values unless they are shown below:
[HKEY_CURRENT_USER\Software\Python]
[HKEY_CURRENT_USER\Software\Python\Pythoncore]
[HKEY_CURRENT_USER\Software\Python\Pythoncore\2.6]
[HKEY_CURRENT_USER\Software\Python\Pythoncore\2.6\InstallPath] 
Value: C:\Python26
[HKEY_CURRENT_USER\Software\Python\Pythoncore\2.6\PythonPath]
Value: C:\Python26;C:\Python26\Lib\;C:\Python26\DLLs\

next time you try to install PyYAML it will detect the python installation, problem solved..

go mad ...

No comments:

Post a comment