Attempted to install NumPy now nltk commands not recognized

65 views
Skip to first unread message

Thomas H Payne

unread,
Nov 26, 2020, 3:29:07 PM11/26/20
to nltk-users
Received long list of error messages which I can provide if someone might help.

Thanks!

Steven Bird

unread,
Nov 26, 2020, 4:04:46 PM11/26/20
to nltk-users
Please go ahead...

On Fri, 27 Nov. 2020, 5:59 am Thomas H Payne, <tpa...@uw.edu> wrote:
Received long list of error messages which I can provide if someone might help.

Thanks!

--
You received this message because you are subscribed to the Google Groups "nltk-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nltk-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/nltk-users/1fe6377a-34ad-4687-8575-1b27e00add9cn%40googlegroups.com.

Thomas H Payne

unread,
Nov 27, 2020, 12:13:35 PM11/27/20
to nltk-users
Here you go.  It says installed successfully but then simple commands in nltk are no longer recognized.

Thanks!

Session_NumPy_problems.rtf

Steven Bird

unread,
Nov 27, 2020, 11:20:22 PM11/27/20
to nltk-users

Thomas,


>>> install nltk

  File "<stdin>", line 1

    install nltk


This is not how nltk is installed.


I expect nltk is already installed, from what you say, in which case you probably just need to import nltk.


Please refer to any guides on getting started with python and nltk.


Thomas H Payne

unread,
Nov 28, 2020, 11:11:01 AM11/28/20
to nltk-users
That command was an error as you note.  However the problem was that I had been using nltk (following your book) successfully up to page 6, but after installing NumPy and Matplotlib in succession, I received the error messages in the attached.  After this unsuccessful attempt to install Matplotlib, nltk commands were no longer recognized.

I solved this by de-installing all 3 packages (pip3 uninstall) and then reinstalling nltk and I'm back in business.  

I will skip installation of NumPy and Matplotlib for now.

Thanks!

Problems_installing_Matplotlib.rtf

Alexis

unread,
Dec 5, 2020, 1:03:54 PM12/5/20
to nltk-users
Indeed, from the log I can see you got a malloc error on `from nltk.book import *`, which is a clear sign that something went wrong. If you want to continue to work with NumPy, I recommend switching to anaconda, which provides a better curated experience for python and many packages (including nltk and numpy).

Alexis

PS If you had included the specific command and error in your email instead of attaching a file with your entire session, you could have gotten support sooner. I recommend doing so in the future: less work for those trying to help you, better results for yourself.

Reply all
Reply to author
Forward
0 new messages