ubuntu16下安装easydict
直接使用命令:
conda install easydict
安装失败。
查找可用安装包:
anaconda search -t conda easydict
查找结果:
wmz@ubuntu:~/anaconda3/bin$ anaconda search -t conda easydict Using Anaconda API: https://api.anaconda.org Run 'anaconda show <USER/PACKAGE>' to get more details: Packages: Name | Version | Package Types | Platforms ------------------------- | ------ | --------------- | --------------- auto/easydict | 1.4 | conda | linux-64, linux-32 : https://github.com/makinacorpus/easydict conda-forge/easydict | 1.9 | conda | noarch : Access dict values as attributes (works recursively). travis/easydict | 1.4 | conda | linux-64 : https://github.com/makinacorpus/easydict tzl/easydict | 1.7 | conda | osx-64 : Access dict values as attributes (works recursively). verydeep/easydict | 1.6 | conda | linux-64 : Access dict values as attributes (works recursively). xxbandy123/easydict | 1.7 | conda | linux-64 : Access dict values as attributes (works recursively). zhaofeng-shu33/easydict | 1.9 | conda | win-64, noarch : Access dict values as attributes (works recursively). Found 7 packages
然后选择一个安装:
conda install easydict==1.6
本以为这样应该可以通过,结果还是有问题。
然后查了一下安装方法:
anaconda show verydeep/easydict
显示返回结果:
wmz@ubuntu:~/anaconda3/bin$ anaconda show verydeep/easydict Using Anaconda API: https://api.anaconda.org Name: easydict Summary: Access dict values as attributes (works recursively). Access: public Package Types: conda Versions: + 1.6 To install this package with conda run: conda install --channel https://conda.anaconda.org/verydeep easydict
然后就可以按照上面的提示安装:
conda install --channel https://conda.anaconda.org/verydeep easydict
这个办法很好,可是在这里还是没有用得上,最终解决的办法:
使用pip安装:
wmz@ubuntu:~/anaconda3$ pip install easydict Traceback (most recent call last): File "/home/wmz/anaconda3/bin/pip", line 6, in <module> sys.exit(pip.main()) AttributeError: module 'pip' has no attribute 'main'
升级pip
easy_install --upgrade pip
升级后安装:
wmz@ubuntu:~/anaconda3$ pip install easydict Processing /home/wmz/.cache/pip/wheels/9a/88/ec/085d92753646b0eda1b7df49c7afe51a6ecc496556d3012e2e/easydict-1.9-cp35-none-any.whl Installing collected packages: easydict Successfully installed easydict-1.9