gensim安装http://blog.csdn.net/helihongzhizhuo/article/details/47038575
2015-07-29 11:59
555 查看
1、windows下的python和pip安装
http://blog.csdn.net/helihongzhizhuo/article/details/47038575
2、pip install gensim 安装gensim,理论上这样就能安装成功了,结果抛出错误如下:
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
----------------------------------------
Failed building wheel for scipy
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-ZcDX4a/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-trjXT2-record/install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-ZcDX4a/scipy
接下来开始了解决错误的漫漫长路
3、看错误scipy出错,以及各种查后说依赖 numpy,于是下载了numpy-1.9.2-win32-superpack-python2.7.exe 和 scipy-0.16.0b2-win32-superpack-python2.7.exe安装,结果一安装,扔出错,
4、解决注册表找不到python2.7的问题
方法:新建一个register.py 文件,把一下代码贴进去,保存
然后,命令窗口运行脚本文件:
加入注册表成功
5、分别安装 numpy-1.9.2-win32-superpack-python2.7.exe 和 scipy-0.16.0b2-win32-superpack-python2.7.exe 程序,均安装成功;
6、再次执行 pip install gensim 也成功,终于安装完成了
http://blog.csdn.net/helihongzhizhuo/article/details/47038575
2、pip install gensim 安装gensim,理论上这样就能安装成功了,结果抛出错误如下:
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
----------------------------------------
Failed building wheel for scipy
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-ZcDX4a/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-trjXT2-record/install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-ZcDX4a/scipy
接下来开始了解决错误的漫漫长路
3、看错误scipy出错,以及各种查后说依赖 numpy,于是下载了numpy-1.9.2-win32-superpack-python2.7.exe 和 scipy-0.16.0b2-win32-superpack-python2.7.exe安装,结果一安装,扔出错,
python
version 2.7 required,which was not found in the registry
4、解决注册表找不到python2.7的问题方法:新建一个register.py 文件,把一下代码贴进去,保存
# # script to register Python 2.0 or later for use with win32all # and other extensions that require Python registry settings # # written by Joakim Loew for Secret Labs AB / PythonWare # # source: # http://www.pythonware.com/products/works/articles/regpy20.htm # # modified by Valentine Gogichashvili as described in http://www.mail-archive.com/distutils-sig@python.org/msg10512.html import sys from _winreg import * # tweak as necessary version = sys.version[:3] installpath = sys.prefix regpath = "SOFTWARE\\Python\\Pythoncore\\%s\\" % (version) installkey = "InstallPath" pythonkey = "PythonPath" pythonpath = "%s;%s\\Lib\\;%s\\DLLs\\" % ( installpath, installpath, installpath ) def RegisterPy(): try: reg = OpenKey(HKEY_CURRENT_USER, regpath) except EnvironmentError as e: try: reg = CreateKey(HKEY_CURRENT_USER, regpath) SetValue(reg, installkey, REG_SZ, installpath) SetValue(reg, pythonkey, REG_SZ, pythonpath) CloseKey(reg) except: print "*** Unable to register!" return print "--- Python", version, "is now registered!" return if (QueryValue(reg, installkey) == installpath and QueryValue(reg, pythonkey) == pythonpath): CloseKey(reg) print "=== Python", version, "is already registered!" return CloseKey(reg) print "*** Unable to register!" print "*** You probably have another Python installation!" if __name__ == "__main__": RegisterPy()
然后,命令窗口运行脚本文件:
加入注册表成功
5、分别安装 numpy-1.9.2-win32-superpack-python2.7.exe 和 scipy-0.16.0b2-win32-superpack-python2.7.exe 程序,均安装成功;
6、再次执行 pip install gensim 也成功,终于安装完成了
相关文章推荐
- Failed to push selection: Read-only file system的解决方法
- zz 通过INFORMATION_SCHEMA.INNODB_TRX、INNODB_LOCKS、INNODB_LOCK_WAITS 三个表获取事务与锁的信息
- 2015 Multi-University Training 3 多校集训 第三场 部分题解及反思
- [模拟] 多校联合第三场 painter HDU 5319
- 2015 Multi-University Training Contest 3 1004
- hdu5319(2015多校3)--Painter(暴力,,,)
- async & await 的前世今生(Updated)
- hdu 5319 Painter 2015 Multi-University Training Contest 3
- SVN svnserve.conf: Option expected 的解决方法 以及 Authorization failed 的解决方法
- HDU-1867-A + B for you again
- 关于出现( linker command failed with exit code 1)错误总结
- 2015 Multi-University Training Contest 3 1002 RGCDQ(hdu5317)
- ZOJ 3450 Doraemon's Railgun (DP·分组背包)
- C++使用localtime函数需要注意的地方http://blog.csdn.net/shellching/article/details/8114266
- zoj 3450Doraemon's Railgun
- HDU 5326 Work 并查集 (2015 Multi-University Training Contest 3 2015多校联合)
- HDU 5319 Painter (2015 Multi-University Training Contest 3 2015多校联合)
- STL中的模板类pair 和map http://blog.csdn.net/calvin_zcx/article/details/6072286
- hdu 5317 RGCDQ 2015 Multi-University Training Contest 3
- 线程安全C/C++ http://blog.csdn.net/huangxy10/article/details/8068653