怎么在Anaconda 2.7下import jieba
我现在在Anaconda 2.7里想要import jieba,但是一直不成功,给我这个提示:
import jieba
Traceback (most recent call last):
File "<ipython-input-211-533d403cdb1f>", line 1, in <module>
import jieba
ImportError: No module named jieba
我已经在terminal里输了 pip install jieba
给我的显示是:
Users-MacBook-Air-5:~ user$ pip install jieba
Requirement already satisfied: jieba in /anaconda/lib/python2.7/site-packages/jieba-0.38-py2.7.egg
不知道这样算不是已经安装好了?但是就是没有办法import
后来看到一个帖子,我试了这个方法:
Users-MacBook-Air-5:~ user$ conda install jieba
Fetching package metadata .........
PackageNotFoundError: Package missing in current osx-64 channels:
jieba
Users-MacBook-Air-5:~ user$ anaconda search -t conda jieba
Using Anaconda API: https://api.anaconda.org
Run 'anaconda show <USER/PACKAGE>' to get more details:
Packages:
Name | Version | Package Types | Platforms
------------------------- | ------ | --------------- | ---------------
auto/jieba | 0.32 | conda | linux-64, linux-32
: http://github.com/fxsjy
conda-forge/jieba | 0.38 | conda | linux-64, win-32, win-64, osx-64
creditx/jieba | 0.38 | conda | linux-64
hargup/jieba | | conda | linux-64
: Chinese Words Segementation Utilities
iilab/jieba | 0.36.2 | conda | linux-64, osx-64
: Chinese Words Segementation Utilities
iilab/jieba3k | 0.35.1 | conda | linux-64, osx-64
: Chinese Words Segementation Utilities
jiangxiluning/jieba | 0.36.2 | conda | linux-64, osx-64, win-64
: Chinese Words Segementation Utilities
moustik/jieba | 0.38 | conda | linux-64
Found 8 packages
Users-MacBook-Air-5:~ user$ conda install -c https://conda.anaconda.org/iilab jieba
Fetching package metadata ...........
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
jieba -> python 3.4*
python 2.7*
Use "conda info <package>" to see the dependencies for each package.
Users-MacBook-Air-5:~ user$ conda install -c https://conda.anaconda.org/iilab jieba3k
Fetching package metadata ...........
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
jieba3k -> python 3.4*
python 2.7*
Use "conda info <package>" to see the dependencies for each package.
那最后这个unsatisfiableErrors是什么问题呢
我是小白,求各位大神carry一下!
unsatisfiableErrors就是运行环境不对的意思,这个包需要python3.4的吧。