gensim安装攻略
(2014-09-22 19:32:26)
标签:
美食 |
这两天服务器硬盘重新分区,需要格了,我之前辛辛苦苦安装的python/gensim/NLTK一水全没了,重装吧,顺便写下安装步骤。
1.下载
(1)python27
(2)numpy182.exe
(3)scipy120.exe
(4)setuptools541.zip
(5)pymssql210.exe,
然后将(1)-(3),(5)先装上,并在环境变量的path字段添加上c:\python27
2.将setuptools541.zip解压缩,然后从cmd窗口进入解压缩后目录,输入命令python ez_setup.py,开始安装easy_install
3.在环境变量path中输入c:\python27\Scripts,这时候可以在cmd中使用easy_install命令了,不过需要注意,一定要把cmd窗口关闭后重新打开才能使用easy_install
4.然后开始安装gensim,不过使用easy_install -U gensim命令时候总是报错,错误信息如dict object has no attribute numpy_setup,谷歌一直没有有价值的信息,后来在gensim官网上看到一条:
you have downloaded and unzipped the tar.gz source for gensim (or you’re installing gensim from github), you can run:
1.下载
(1)python27
(2)numpy182.exe
(3)scipy120.exe
(4)setuptools541.zip
(5)pymssql210.exe,
然后将(1)-(3),(5)先装上,并在环境变量的path字段添加上c:\python27
2.将setuptools541.zip解压缩,然后从cmd窗口进入解压缩后目录,输入命令python ez_setup.py,开始安装easy_install
3.在环境变量path中输入c:\python27\Scripts,这时候可以在cmd中使用easy_install命令了,不过需要注意,一定要把cmd窗口关闭后重新打开才能使用easy_install
4.然后开始安装gensim,不过使用easy_install -U gensim命令时候总是报错,错误信息如dict object has no attribute numpy_setup,谷歌一直没有有价值的信息,后来在gensim官网上看到一条:
you have downloaded and unzipped the tar.gz source for gensim (or you’re installing gensim from github), you can run:
python setup.py install
于是下载下来tar.gz 包,解压缩后使用上述命令跑了下,成功
第二天,在导入pymssql 时候,idle总是自动重启,很奇怪,后来更换到早期版本1.0.0,解决问题