python开发之anaconda以及win7下安装gensim的方法

yipeiwu_com7年前Python基础

一、推荐安装Anaconda

官方介绍:Anaconda is a completely free Python distribution (including for commercial use and redistribution). It includes more than 400 of the most popular Python packages for science, math, engineering, and data analysis. 

下载页面:https://www.continuum.io/downloads

Python的有些模块在单独安装时可能非常麻烦,Anaconda中则已经集成好了许多常见的模块,用起来非常方便。

安装Anaconda之前不需要预先安装python,它其中已经自带Python、IPython、集成开发环境Spyder、一些包等等。 

anaconda自带的conda命令:

# 查看安装的包
conda list
# 安装模块
conda install scipy
# 更新模块
conda update scipy
# 更新所有模块
conda update --all
# 升级Anaconda
conda update conda
conda update anaconda

二、gensim安装

因为需要学习使用word2vec,所以要安装gensim模块。

用传统python安装gensim库时,由于依赖的库比较多,试过很多教程之后还是失败。

利用上面安装好Anaconda之后,直接pip install gensim就成功了。

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持【听图阁-专注于Python设计】。

相关文章

使用Python操作FTP实现上传和下载的方法

搭建ftp服务器server端 # -*- coding:utf-8 -*- from pyftpdlib.authorizers import DummyAuthorizer fr...

Pandas 数据处理,数据清洗详解

如下所示: # -*-coding:utf-8-*- from pandas import DataFrame import pandas as pd import numpy a...

老生常谈Python startswith()函数与endswith函数

函数:startswith() 作用:判断字符串是否以指定字符或子字符串开头 一、函数说明 语法:string.startswith(str, beg=0,end=len(string)...

Python中asyncio与aiohttp入门教程

Python中asyncio与aiohttp入门教程

很多朋友对异步编程都处于“听说很强大”的认知状态。鲜有在生产项目中使用它。而使用它的同学,则大多数都停留在知道如何使用 Tornado、Twisted、Gevent 这类异步框架上,出现...

Python内置random模块生成随机数的方法

本文我们详细地介绍下两个模块关于生成随机序列的其他使用方法。 随机数参与的应用场景大家一定不会陌生,比如密码加盐时会在原密码上关联一串随机数,蒙特卡洛算法会通过随机数采样等等。Pytho...