欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 健康 > 美食 > 在使用JupyterNoteBook中下载Pymsql组件时可能遇到的情况

在使用JupyterNoteBook中下载Pymsql组件时可能遇到的情况

2025/4/3 6:21:31 来源:https://blog.csdn.net/iceslime/article/details/146555538  浏览:    关键词:在使用JupyterNoteBook中下载Pymsql组件时可能遇到的情况

在我们学习数据分析与可视化使用Jupyter的过程中,可能会遇到下图的情况:

(base) C:\Users\kinect_user>pip install pymysql
Looking in indexes: https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
Collecting pymysql
  Downloading https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/4f/52/a115fe175028b058df353c5a3d5290b71514a83f67078a6482cff24d6137/PyMySQL-1.0.2-py3-none-any.whl (43kB)
    100% |████████████████████████████████| 51kB 191kB/s
distributed 1.21.8 requires msgpack, which is not installed.
Installing collected packages: pymysql
Successfully installed pymysql-1.0.2
You are using pip version 10.0.1, however version 21.3.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

这是因为系统中已经安装了distributed这个库,而distributed需要msgpack这个库来正常工作。不过,这个提示并不影响你安装pymysql,只是提醒如果后续要使用distributed的功能,可能需要单独安装msgpack

提示pip版本过低

pip版本是10.0.1,而当前最新的版本是21.3.1。这是一个比较老的版本了,可能会导致一些兼容性问题,或者无法安装某些新版本的库。建议按照提示,运行python -m pip install --upgrade pip来升级pip到最新版本。

输入以下两行代码即可解决问题
 

pip install msgpack
python -m pip install --upgrade pip

最后再使用pip下载

pip install pymysql

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词