问题
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:
- Forked the Textblob program from here.
- Copied the entire repository to my desktop, and opened the folder up.
- 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