9

I am trying to install NLTK (https://pypi.python.org/pypi/nltk). I have Python 3.6 installed on my Windows 10 (64 bit) computer. When I run the NLTK installer, I get the following error:

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

Does anyone have any experience with this or know how to resolve the error?

6
  • Other than installing a 64-bit version or building from source? Commented Apr 16, 2017 at 21:32
  • @Ignacio Vazquez-Abrams I am not aware of a 64bit version but I am new to NLTK. Could you point me to where that is located? Commented Apr 16, 2017 at 21:39
  • @abccd I am not familiar with PIP install. Could you provide more details? Commented Apr 16, 2017 at 21:39
  • @abccd never mind. Using pip ntlk did it Commented Apr 16, 2017 at 21:47
  • Oh well, I'll just leave my answer for future readers I guess Commented Apr 16, 2017 at 21:50

4 Answers 4

10

Nltk itself is os independent, but the Windows msi installer is not, it's specifically for 32-bits pythons. Alternatively, you can use pip to install nltk, which will install the os independent source file. Simply in cmd, type this:

pip3 install nltk
# pip/pip3 doesn't matter only if there's multiple pythons, but if that does not work (command not found) type:
py -3 -m pip install nltk
Sign up to request clarification or add additional context in comments.

Comments

2

This works for me: py -m pip install nltk

Comments

1

I found the issue and was able to solved my problem:

Windows 10 users with Python 64 bit might encounter a RuntimeError when trying to run import nltk. A recent Windows 10 update has a known bug when running the most recent version of NumPy 1.19.4 on the Python 64 bit version.

Solution: uninstall NumPy version 1.19.4 and reinstall 1.19.3.

From the command prompt:

pip uninstall numpy pip install numpy==1.19.3

If you are running a Mac and/or Python 32 bit the import nltk command should work fine.

For more information on the Windows bug: https://developercommunity.visualstudio.com/content/problem/1207405/fmod-after-an-update-to-windows-2004-is-causing-a.html

Best, Genie

Comments

0

after running
py -m pip install nltk as suggested by Priscilla's comment above

I close my VS code and reopen it and everything is working !

1 Comment

Yea, may things have changed and problems have been resolved in the versions that came up during the last four years...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.