opennmt安装踩坑记录

两种安装方式:
1、pip install
这种安装方式装的opennmt是1.2.0版本,会导致onmt_build_vocab等命令无法识别。
解决方法:

pip install --upgrade OpenNMT-py==2.0.0rc1

2、build

git clone https://github.com/OpenNMT/OpenNMT-py.git
cd OpenNMT-py
python setup.py install

这种方式中会出现的错误opennmt-py 2.0.0rc2 has requirement pyyaml==5.3.1, but you'll have pyyaml 3.13 which is incompatible.
pip之后依然会:Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
解决方案:

pip install --ignore-installed PyYAML==5.3.1

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容