Nltk: Cannot Install on Windows

Created on 2 Jan 2017  ·  27Comments  ·  Source: nltk/nltk

I'm having issues installing NLTK on a Windows 7 64-bit machine with Python 3.5 32-bit installed. I'm using the executable located here : https://pypi.python.org/pypi/nltk

However, I am prompted with an error after running the executable that reads:

"Python version -32 required, which was not found in the registry".

I've tried this installation against Windows 7 systems with Python 2.7, 3.4, 3.5 & 3.6 installed and they all fail with the same error. The 32-bit entry for Python exists in the Current User and Local Machine hives, however, the installation does not process.

Please help, thanks.

Most helpful comment

Thanks. I managed it with pip:

python -m pip install nltk

The executable doesn't work.

All 27 comments

cf #1079

This isn't quite the same issue I think; I'm running the 32-bit version of Python on a 64-bit OS. So the 32-bit installer of NLTK should work based on the requirements.. but it's not seeing the registry entries.

@terencen in the Python interpreter, what is your output for:

>>> import struct
>>> print (struct.calcsize("P") * 8)

And what is your output for

>>> import platform
>>> platform.architecture()

print (struct.calcsize("P") * 8)
32

platform.architecture()
('32bit','WindowsPE')

I'm having the same issue. Both terencen and I are trying to install (on different machines), but have the same issue.
Output for my Windows 10 machine is the same as terencen's:

Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import struct
>>> print (struct.calcsize("P") * 8)
32
>>> import platform
>>> platform.architecture()
('32bit', 'WindowsPE')
>>> 

Similar error and outputs...Any suggestions?

ok finally it did work:) Please ensure version compatibility. If you have downloaded python 3.5(32 bit) ...all installations/add on should be 32 bits...
http://web.cs.wpi.edu/~cs1004/a16/Resources/Windows/SettingUpPython_Windows.pdf
Good Luck!

Thanks. I managed it with pip:

python -m pip install nltk

The executable doesn't work.

Thanks! Worked like a charm with pip

Thanks @maitetaboada, @ruchiHub.
Have you resolved this issue @terencen?

Thank you so much @maitetaboada.

Hi, I'm having the same problem, same output as terencen. Python 3.5 (also tried other versions), 64 bit computer but 32 bit python. I download the nltk executable, when I run it, following an introductory screen, it gives me: "Python version -32 required, which was not found in the registry".

Any help would be much appreciated.

Hi, kmstock. It worked for me with the pip install. See above.

Hi Maiteaboada, Thanks for that. I had tried your command yesterday without success, but with fresh eyes and a bit of other research, it seems to have worked. Many thanks!

@maitetaboada
Thanks a lot!

You can try using pip. As @maitetaboada mentioned. Her help worked for me

Thanks @maitetaboada

Installed Python 3.5.0 32 bit on Windows, it did not create any registry entries - I manually added it to get NLTK installer to see it, but then there was an unhandled exception during the installation of "parameter count mismatch". Pip installation works fine, the executable installer should either be fixed or just removed since Pip install already is fine.

Hi, I'm new to python. How do I go about the pip installation exactly? Thanks!

I'm running the right version, I think... Not sure what I am doing wrong. Any guidance would be appreciated.

Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:16:59) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.

>>> python -m pip install nltk
SyntaxError: invalid syntax
>>> import struct
>>> print (struct.calcsize("P") * 8)
32
>>> import platform
>>> platform.architecture()
('32bit', 'WindowsPE')
>>> 

@bjpl hello there

You should use 'pip' in command prompt, not in python. See example below:

C:\User\bjpl> python -m pip install nltk

hope this help u!

Thanks @hendro93
I had to use py instead of python, but now eveything seems to be working!

Thanks @bjpl!! I was so close to giving up and then I used py instead of python and it worked!

Thanks maitetaboada. your solution worked for me.

Executables don't work at all! Try pip as maitetaboada said.

do any one know how to add nltk library in ironpython? i try all solution almost :|

Thank you so much @maitetaboada.

I tried pip too. python or py doesnt work either. It says
File "", line 1
py -m pip install nltk
^
SyntaxError: invalid syntax

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vezeli picture vezeli  ·  3Comments

mwess picture mwess  ·  5Comments

BLKSerene picture BLKSerene  ·  4Comments

ndvbd picture ndvbd  ·  4Comments

DavidNemeskey picture DavidNemeskey  ·  4Comments