推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
kench
V2EX  ›  Python

ipython import error

  •  
  •   kench · Jun 8, 2016 · 5452 views
    This topic created in 3763 days ago, the information mentioned may be changed or developed.

    how to show picture?

    10 replies  •  2016-06-09 10:13:42 +08:00
    cashew
        1
    cashew  
       Jun 8, 2016
    jieba 是个什么鬼。
    ImportError: No module named jieba
    没有名字为“ jieba ”的模块。
    cashew
        2
    cashew  
       Jun 8, 2016
    如果是你自己编写的 jieba 模块,你需要将 jieba.py 加入到 sys.path 中。
    muziki
        4
    muziki  
       Jun 8, 2016 via iPhone
    @cashew 一个中文分词库
    检查一下是不是没安装 jieba 库
    theFool
        5
    theFool  
       Jun 9, 2016
    检查下 pip 版本是不是对应 Python 3 的。
    再
    import sys
    sys.path
    看下路径, 检查路径里有没有 jieba 模块。
    kench
        6
    kench  
    OP
       Jun 9, 2016
    @theFool 版本是对的,模块也装了, pip 装的模块在 python 下可用,在 ipython 下就没办法用了。。。
    按照你的方法,路径里确实没有相应的模块,我的 python 是 pyenv 装的
    kench
        7
    kench  
    OP
       Jun 9, 2016
    @Perry 我用 pip 安装的模块在 ipython 下都使用不了?
    theFool
        8
    theFool  
       Jun 9, 2016
    @kench
    pip --version 看下模块安装目录, ipython
    theFool
        9
    theFool  
       Jun 9, 2016
    @theFool
    ipython 里
    import sys
    sys.path.append 添加那个目录

    再 import jieba 看看呢。

    (上条手滑发出去了。
    kench
        10
    kench  
    OP
       Jun 9, 2016
    @theFool 谢谢,成功了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1149 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 23:53 · PVG 07:53 · LAX 16:53 · JFK 19:53
    ♥ Do have faith in what you're doing.