无法安装适用于Python的TextBlob [英] Trouble installing TextBlob for Python

查看:222
本文介绍了无法安装适用于Python的TextBlob的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是编程新手,我正在尝试安装适用于Python的TextBlob库,以帮助我做一些事情.不幸的是,我在安装TextBlob时遇到问题,更不用说使用它了.我正在使用Windows,这似乎使事情变得更加困难.我希望我可以运行Linux命令或每个人使用的命令.无论如何

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. 此处.派生了Textblob程序.
  2. 将整个存储库复制到我的桌面,然后打开文件夹.
  3. 使用命令提示符运行"Python C:\ Users ... \ setup.py install"

命令提示符后退-

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'

我不知道该怎么办或如何解决此问题.全新下载的TextBlob是否应该具有安装功能?我搞砸了吗?

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?

推荐答案

安装时,您应该目录中.试试:

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.

这篇关于无法安装适用于Python的TextBlob的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆