首页 > 学院 > 开发设计 > 正文

ImportError: No module named yaml解决方案

2019-11-06 08:12:55
字体:
来源:转载
供稿:网友

ImportError: No module named yaml

PRoblem : I got the "ImportError: No module named yaml " error when I attempted  to install NLTK toolkit to my Ubuntu system.

solution:

yaml library for Python seems to not be installed on your system.

On ubuntu system just do a :

  sudo apt-get install python-yaml

On windows

  easy_install python-yaml

    easy_install rosinstall

在window下安装的时候可能没有自带安装easy_install 需要我们手动安装

首先下载easy_install的安装包,下载地址:http://pypi.python.org/pypi/setuptools

在页面上找到 ez_setup.py下载下来,执行即可

嫌麻烦的直接下载 PyYAML-3.10.win32-py2.7.exe

安装python的pip和easy_install,方便安装软件包 

[html] view plain copy cd ~  wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py   sudo python ez_setup.py --insecure   wget https://bootstrap.pypa.io/get-pip.py   sudo python get-pip.py  

安装Python依赖

[html] view plain copy cd pyhon #里面有requirements.tx文件  sudo apt-get install python-pip  sudo su  for req in $(cat "requirements.txt"); do pip install -i https://pypi.tuna.tsinghua.edu.cn/simple $req; done 


上一篇:pyCharm最新2017激活码

下一篇:单例模式

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表