打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
​成功解决raise ImportError(msg) from None


ImportError: Missing optional dependency 'fastparquet'. fastparquet is required for parquet support. Use pip or conda to install fastparquet.


解决问题

raise ImportError(msg) from None
ImportError: Missing optional dependency 'fastparquet'. fastparquet is required for parquet support. Use pip or conda to install fastparquet.

解决思路

提示导入错误(msg)
导入错误:缺少可选依赖项“fastparquet”。fastparquet 需要parquet支持。使用pip或conda安装fastparquet

解决方法

T1、pip本地下载

如果原先存在,可卸掉pyarrow后,重新下载即可!
pip install pyarrow-2.0.0-cp37-cp37m-win_amd64.whl

T2、pip在线下载

分别安装下边两个包

pip install fastparquet
pip install --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple pyarrow 
pip --default-timeout=1000 install --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple fastparquet
(base) C:\Users\niu>conda install -i https://pypi.tuna.tsinghua.edu.cn/simple fastparquet
usage: conda-script.py [-h] [-V] command ...
conda-script.py: error: unrecognized arguments: -i

(base) C:\Users\niuyayun>conda install fastparquet
Collecting package metadata (current_repodata.json): done
Solving environment: |
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:

  - defaults/win-64::anaconda==2020.02=py37_0
  - defaults/win-64::bkcharts==0.2=py37_0
  - defaults/noarch::dask==2.11.0=py_0
  - defaults/noarch::seaborn==0.10.0=py_0
  - defaults/win-64::statsmodels==0.11.0=py37he774522_0
failed with initial frozen solve. Retrying with flexible solve.
Solving environment: done
Collecting package metadata (repodata.json): done
Solving environment: /
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:

  - defaults/win-64::anaconda==2020.02=py37_0
  - defaults/win-64::bkcharts==0.2=py37_0
  - defaults/noarch::dask==2.11.0=py_0
  - defaults/noarch::seaborn==0.10.0=py_0
  - defaults/win-64::statsmodels==0.11.0=py37he774522_0
done

## Package Plan ##

  environment location: D:\ProgramData\Anaconda3

  added / updated specs:
    - fastparquet


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    _anaconda_depends-2020.02  |           py37_0           6 KB
    anaconda-custom            |           py37_1           3 KB
    ca-certificates-2020.10.14 |                0         122 KB
    certifi-2020.6.20          |           py37_0         156 KB
    conda-4.9.0                |           py37_0         2.9 MB
    fastparquet-0.4.1          |   py37h2a96729_0         3.4 MB
    openssl-1.1.1h             |       he774522_0         4.8 MB
    pandas-1.1.3               |   py37ha925a31_0         7.3 MB
    thrift-0.11.0              |   py37h6538335_0         102 KB
    ------------------------------------------------------------
                                           Total:        18.8 MB

The following NEW packages will be INSTALLED:

  _anaconda_depends  pkgs/main/win-64::_anaconda_depends-2020.02-py37_0
  fastparquet        pkgs/main/win-64::fastparquet-0.4.1-py37h2a96729_0
  pandas             pkgs/main/win-64::pandas-1.1.3-py37ha925a31_0
  thrift             pkgs/main/win-64::thrift-0.11.0-py37h6538335_0

The following packages will be UPDATED:

  ca-certificates                                2020.1.1-0 --> 2020.10.14-0
  certifi                                 2019.11.28-py37_0 --> 2020.6.20-py37_0
  conda                                        4.8.2-py37_0 --> 4.9.0-py37_0
  openssl                                 1.1.1d-he774522_4 --> 1.1.1h-he774522_0

The following packages will be DOWNGRADED:

  anaconda                                   2020.02-py37_0 --> custom-py37_1


Proceed ([y]/n)? pip install fastparquet
Invalid choice: pip install fastparquet
Proceed ([y]/n)?


Downloading and Extracting Packages
_anaconda_depends-20 | 6 KB      | ############################################################################ | 100%
conda-4.9.0          | 2.9 MB    | ############################################################################ | 100%
pandas-1.1.3         | 7.3 MB    | ################################################################################################################# | 100%
certifi-2020.6.20    | 156 KB    | ################################################################################################################# | 100%
anaconda-custom      | 3 KB      | ################################################################################################################# | 100%
ca-certificates-2020 | 122 KB    | ################################################################################################################# | 100%
thrift-0.11.0        | 102 KB    | ################################################################################################################# | 100%
fastparquet-0.4.1    | 3.4 MB    | ################################################################################################################# | 100%
openssl-1.1.1h       | 4.8 MB    | ################################################################################################################# | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

哈哈,大功告成!

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Python网络爬虫(七):解决ImportError:DLL load failed:操作系统无法运行问题
ubuntu系统问题
window下安装jupyter
解决安装AI算法库TensorFlow 2.0的最新入坑指南以及详细的安装教程【分别在linux和w...
Anaconda+Pycharm环境下的PyTorch配置方法
Python安装第三方库攻略(pip和Anaconda)
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服