ERROR:Cannot uninstall 'llvmlite', It is a distutils... 和 KeyError: 'figure.constrained_layout.use'

本文详细记录了解决在Windows环境下安装pandas_profiling包遇到的权限错误问题的过程,通过逐一升级依赖包并使用特定参数最终成功安装。同时,分享了一个使用Chrome浏览器解决在Jupyter Notebook中使用该包时遇到的问题的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

安装pandas_profiling出现如下错误:

pip install pandas_profiling

然后我分别升级这几个包:

(base) C:\Users\Rachel>pip install pandas==0.23.4
Collecting pandas==0.23.4
  Downloading https://files.pythonhosted.org/packages/0e/67/def5bfaf4d3324fdb89048889ec523c0903c5efab1a64c8dbe0ac8eec13c/pandas-0.23.4-cp36-cp36m-win_amd64.whl (7.7MB)
     |████████████████████████████████| 7.7MB 595kB/s
Requirement already satisfied: numpy>=1.9.0 in e:\program\anaconda3\lib\site-packages (from pandas==0.23.4) (1.15.4)
Requirement already satisfied: pytz>=2011k in e:\program\anaconda3\lib\site-packages (from pandas==0.23.4) (2017.3)
Requirement already satisfied: python-dateutil>=2.5.0 in e:\program\anaconda3\lib\site-packages (from pandas==0.23.4) (2.6.1)
Requirement already satisfied: six>=1.5 in e:\program\anaconda3\lib\site-packages (from python-dateutil>=2.5.0->pandas==0.23.4) (1.11.0)
Installing collected packages: pandas
  Found existing installation: pandas 0.22.0
    Uninstalling pandas-0.22.0:
      Successfully uninstalled pandas-0.22.0
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: 'e:\\program\\anaconda3\\lib\\site-packages\\~andas\\io\\msgpack\\_packer.cp36-win_amd64.pyd'
Consider using the `--user` option or check the permissions.

WARNING: You are using pip version 19.1.1, however version 19.2.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
(base) C:\Users\Rachel>pip install numpy==1.15.4
Collecting numpy==1.15.4
  Downloading https://files.pythonhosted.org/packages/51/70/7096a735b27359dbc0c380b23b9c9bd05fea62233f95849c43a6b02c5f40/numpy-1.15.4-cp36-none-win_amd64.whl (13.5MB)
     |████████████████████████████████| 13.5MB 939kB/s
Installing collected packages: numpy
  Found existing installation: numpy 1.14.2
    Uninstalling numpy-1.14.2:
      Successfully uninstalled numpy-1.14.2
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: 'e:\\program\\anaconda3\\lib\\site-packages\\~umpy\\core\\multiarray.cp36-win_amd64.pyd'
Consider using the `--user` option or check the permissions.

 

安装每个包时均出现下列报错

虽然报了这样的错误,但是这个还是更新成功了。

更新完包后再安装pandas_profiling

报如下错

然后采用如下语句后再进行安装,此时安装成功啦。

(base) C:\Users\Rachel>pip install --ignore-installed llvmlite
Collecting llvmlite
  Using cached https://files.pythonhosted.org/packages/ce/7b/3f18064766f42102ac6a7982372ef95f84211959be3e7b91c2837cbb201c/llvmlite-0.29.0-cp36-cp36m-win_amd64.whl
Installing collected packages: llvmlite
Successfully installed llvmlite-0.29.0
WARNING: You are using pip version 19.1.1, however version 19.2.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

也可参考如下博客方法:https://www.codetd.com/article/1061047

但虽然安装成功了,导入该包也成功了,但是使用该包语句时却报错:

尝试很多种方法,未能成功,最后的解决方法也是很搞笑,使用chrome浏览器打开jupyter notebook即可。

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值