I'm trying to install a python api for controlling imagemagick (this开发者_开发技巧) and followed the instructions.
I imported easy_install:
import easy_install
and then input the line:
easy_install http://svn2.assembla.com/svn/pythonmagickwand/trunk
However I got the error
SyntaxError: invalid syntax
and 'http' was highlighted. I'm wondering what causes the error - this is on Windows XP.
Check http://peak.telecommunity.com/DevCenter/EasyInstall#using-easy-install for a good reference.
also, easy_install is run from the command line.
easy_install
is a shell command, run at the shell.
It's not a python command; it's not run from within Python.
I believe easy_install is a script that should be run from the command line
Typical easy_install usage would be more like "easy_install imagemagick", a package name rather than a pointer to an svn repository. It looks like you can install from svn via easy_install with the -i flag. Long-term, I'd suggest looking at pip: it does everything easy_install does, but with a lot more flexibility and without creating eggs for everything (which makes it easier to edit and modify by hand when you need to patch something).
精彩评论