成功解决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
哈哈,大功告成!