Trouble installing TextBlob with pip

I’m having a bit of difficulty when installing TextBlob in the command line on Windows 10 using pip.

According to their docs, you need to run two commands in succession:

pip install -U textblob
python -m textblob.download_corpora

Upon trying the first command, I get an error I have never seen before when trying to install a package:

C:Usersphys>pip install -U textblob
Traceback (most recent call last):
  File "c:program files (x86)python37-32librunpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:program files (x86)python37-32librunpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:Program Files (x86)Python37-32Scriptspip.exe__main__.py", line 9, in <module>
TypeError: 'module' object is not callable

I’m not exactly a Windows 10 whiz and I don’t really know what’s going on here – Could someone please point me in the right direction?

Thanks!

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

This is an error with the newest version of pip. If you have recently updated pip and are having this issue, here is what worked for me (based on https://github.com/pypa/pip/issues/7209):

python -m pip uninstall pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py --user
python -m pip install --user textblob

This uninstalls and reinstalls pip using –user.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x