ImportError:无法导入名称'msgpack'

时间:2018-03-19 16:35:37

标签: python pandas dask castra

我正在关注使用castra和dask阅读reddit评论的tutorial

我使用pip使用anaconda和castra安装了最新版本的dask和pandas。我的pandas版本是'0.22.0',我使用pip install pandas-msgpack -U安装了msgpack我正在使用Python 3.6。

尝试导入castra会给我以下错误:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-16-fcdf7be49118> in <module>()
     32 from pandas import Timestamp, NaT, DataFrame
     33 from toolz import dissoc
---> 34 from castra import Castra
     35 from toolz import peek, partition_all
     36 import time

/Users/edefilippis/anaconda/lib/python3.6/site-packages/castra/__init__.py in <module>()
----> 1 from .core import Castra
      2 
      3 __version__ = '0.1.7'

/Users/edefilippis/anaconda/lib/python3.6/site-packages/castra/core.py in <module>()
     22 import pandas as pd
     23 
---> 24 from pandas import msgpack
     25 
     26 

ImportError: cannot import name 'msgpack'

1 个答案:

答案 0 :(得分:1)

根据https://pandas-msgpack.readthedocs.io/en/latest/install.html尝试:

conda install pandas-msgpack --channel conda-forge

因为您可能缺少某些依赖项。另见pip vs conda:

What is the difference between pip and conda?