torchtext安装方法总结

torchtext安装方法总结

  • pip直接安装
pip install torchtext

这种方法我尝试的时候总是会自动更新pytorch;

  • conda直接安装
conda search torchtext
conda install torchtext

或者

conda install -c pytorch torchtext

然而我的conda找不到torchtext包;

  • 借助anaconda安装
conda install -c derickl torchtext

这种方法我看到有人说安装成功的,但我试了后依旧安装不了;

  • 源码安装
    链接在这里torchtext源码
    链接里有说明python与pytorch不同版本该安装哪个版本的torchtext。比如我是python3.6,pytorch1.0.1,安装的torchtext0.5。
    安装的时候并不会重新安装torch。
    安装命令如下:
git clone https://github.com/pytorch/text torchtext
cd torchtext
git submodule update --init --recursive
python setup.py clean install

你可能感兴趣的:(工具安装,pytorch,自然语言处理,深度学习,神经网络,数据挖掘)