一点也不“easy”的easy_install -- windows or linux?

有这样一个传说,easy_install 可以用于便捷地安装其他python工具包,但在我的实际安装过程中,并不便捷(至少我的电脑是这样)。。

1. windows下安装easy_install (32和64位都是一样的ez_setup.py安装脚本):
首先,可能会碰到的问题

原因是国内某些软件安装后修改注册表导致的库无法安装,需要修改python的lib目录下文件,参见http://bitbucket.org/pypa/setuptools/issue/127/unicodedecodeerror-when-install-in-windows

然后,需要利用easy_install“方便”地安装其它python包了,大部分包可以通过easy_install正常安装,但是有些是不行的,比如安装这个自然语言处理的工具包gensim。gensim这个包依赖numpy和scipy,单说这个scipy(numpy以前exe安装过的),就会碰到如下问题,应该还是缺依赖包

建议还是别费时间直接找exe版本单独安装吧。。如果有毅力解决可以参考:
但是注意,还有一个坑爹的,就是scipy不能装10.0以上的版本,因为高版本替掉了如maxentropy模块,会导致gensim不能用,所以还是要使用10.0一下版本(10.0应该也可以)。

:64位的找numpy和scipy的exe还要单独找,官方只有32位版本。

最后,安装gensim包一般会提示出现如下问题,因为没找到VS2008的编译器

需要下载并在环境变量配置好mingw,配置修改参见:

不过换用mingw可能会出现下面问题

这个崩溃的问题我电脑上无解,最后放弃。。无奈的是,在有些电脑上可以顺利安装不会遇到上面说的这么多麻烦。

2.   linux下安装easy_install就方便很多,之后再安装包也没问题。
linux下唯一可能的情况就是安装easy_install有时会报ImportError错误,参考stackoverflow解决很容易:


总结:
从上面的安装记录过程,可以深刻地得出两个结论:
1)在使用开源工具时,强烈建议使用linux系统而不要去搜索尝试“xxx在windows下的安装方法”,过程中往往会碰到许多莫名的问题,找到所有问题的解答有时又是如此艰难!类似这次easy_install安装gensim的经历,前段时间尝试在windows下安装nutch开源爬虫工具,同样是浪费了两三天时间,遇到并处理各种问题,最后的结果是--没装上!!!而当换用linux后,安装就变得顺畅多了,这几次的经历让我下定了决心,以后再要用 开源工具,一定用linux,绝对不用windows

2) stackoverflow这个网站解决程序员的问题真的是最靠谱的,比百度出来的各种胡扯乱说要靠谱的多得多。

WARNING: The script easy_install-3.9 is installed in '/home/gucci/Python-3.9.0/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts pip3 and pip3.9 are installed in '/home/gucci/Python-3.9.0/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script easy_install-3.9 is installed in '/home/gucci/Python-3.9.0/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts pip3 and pip3.9 are installed in '/home/gucci/Python-3.9.0/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script easy_install-3.9 is installed in '/home/gucci/Python-3.9.0/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts pip3 and pip3.9 are installed in '/home/gucci/Python-3.9.0/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script easy_install-3.9 is installed in '/home/gucci/Python-3.9.0/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
最新发布
07-14
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值