Trouble installing TextBlob for Python

萝らか妹 提交于 2019-12-24 00:47:01

问题


I am new to programming, and I'm trying to install the TextBlob library for Python to help me do some stuff. Sadly, I'm having trouble installing TextBlob, let alone use it. I am using Windows, which seems to make things more difficult. I wish I could just run the Linux commands or whatever they are that everybody uses. Anyway

Here is what I have done so far:

  1. Forked the Textblob program from here.
  2. Copied the entire repository to my desktop, and opened the folder up.
  3. Using Command Prompt, ran "Python C:\Users...\setup.py install"

Command Prompt spits back-

Traceback (most recent call last):
  File "C:\Users\Sam\Desktop\TextBlob\setup.py", line 56, in <module>
    __version__ = find_version("textblob/__init__.py")
  File "C:\Users\Sam\Desktop\TextBlob\setup.py", line 45, in find_version
    with open(fname, 'r') as fp:
IOError: [Errno 2] No such file or directory: 'textblob/__init__.py'

And I have no idea what to do or how to fix this. Shouldn't this fresh download of TextBlob have the ability to install? What am I messing up?


回答1:


You are expected to be in the directory when installing. Try:

cd C:\Users\Sam\Desktop\TextBlob
python setup.py install

BTW try to get out of the habit of saving things to the desktop. You should only have short cuts on there especially on corporate machines as they often save the desktop on shutdown to the network and load it on startup - this slows things down a lot when there are files and directories on there.



来源:https://stackoverflow.com/questions/20562768/trouble-installing-textblob-for-python

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!