当前位置:网站首页>安装snownlp包过程出现Requirement already satisfied:及Read timed out.问题解决方法
安装snownlp包过程出现Requirement already satisfied:及Read timed out.问题解决方法
2022-07-24 05:33:00 【爱吃修狗的菜包】
遇到问题:最近在做一个情感分析聚类方面的项目,使用电脑中安装的 pycharm ,解释器为python 3.10 运行一个python文件时,出现了 ModuleNotFoundError: No module named 'snownlp' 的报错,需要安装 snownlp 库。

而当使用 win+R 快捷键打开 cmd,输入pip install snownlp 命令时,却得到 Requirement already satisfied: snownlp in e:\anaconda\lib\site-packages\snownlp-0.12.3-py3.9.egg (0.12.3) 的提示,告诉我已经有 snownlp 存在于 e:\anaconda\lib\site-packages 路径中,但是我们在 pycharm 中运行 python 文件时还是缺少 snownlp 库。

分析原因,是因为已经存在的snownlp库是存在于e:\anaconda\lib\site-packages 路径中,而我们使用的 python 解释器安装在 E:\python3.10.1 文件夹下,目前 E:\python3.10.1\Lib\site-packages 路径中是不存在 snownlp 库的,所以运行 python 文件会报错。所以我们需要将 snownlp 库安装在对应路径下,才可以正常运行该 python 文件。
解决方法:在 cmd 中使用 pip install --target=目标路径 工具包名字 的命令去安装所需要的库。例如,我使用 pip install --target=E:\python3.10.1\Lib\site-packages snownlp 这个命令去安装 snownlp 库,就可以成功安装。

开始下载之后还出了个小插曲,报错 raise ReadTimeoutError(self._pool, None, "Read timed out.") ,告诉我下载超时-_-|||
分析原因,是因为下载的库是国外的,连接速度比较慢,而且当时家里网速也有点慢 。所以 ,给它多配置点时间就好了。
解决方法:在 cmd 中使用 pip --default-timeout=延迟秒数 install 库名 的命令去安装所需要的库。例如,我使用 pip --default-timeout=1000 install --target=E:\python3.10.1\Lib\site-packages snownlp 这个命令去安装 snownlp 库,这次终于成功安装完毕了。

边栏推荐
- Detailed analysis of the process (life cycle) of class loading
- (static, dynamic, file) three versions of address book
- Go environment construction and start
- It's not too much to fight a landlord in idea!
- Redis特殊数据类型-BitMap
- [audio decoding chip] Application of vs1503 audio decoding chip
- Jenkins CI CD
- kubernetes 的Deployment(部署),Service概念,动态扩缩容
- 在IDEA里斗个地主不过分吧!
- 【音频解码芯片】VS1503音频解码芯片的应用
猜你喜欢

这些坑你不掌握,你还真不敢用BigDecimal
![[audio decoding chip] Application of vs1503 audio decoding chip](/img/ee/0d5f95fba647592cc95f1e9f410bc9.png)
[audio decoding chip] Application of vs1503 audio decoding chip

(static, dynamic, file) three versions of address book

实验:磁盘配额操作

It's not too much to fight a landlord in idea!

Sed command

【USB电压电流表】基于STM32F103C8T6 for Arduino

Special effects - when the mouse moves, stars appear to trail

Combination of grep and regular

xxl执行节点错误日志刷屏
随机推荐
PostgreSQL date handler usage
[lvgl (6)] display Chinese settings and make Chinese font
postgresql 日期处理函数用法
基于回归分析的广告投入销售额预测——K邻近,决策树,随机森林,线性回归,岭回归
kubernetes简介和架构及其原理
[small object velocimeter] only principle, no code
NFS shared services and experiments
【LVGL(1)】LVGL的简单介绍
JS: why [] = =! [] return true?
[audio decoding chip] Application of vs1503 audio decoding chip
RAID configuration experiment
Talk about strong cache and negotiation cache
Explain the event cycle mechanism and differences between browser and node in detail
ESP32超详细学习记录:NTP同步时间
These 10 kinds of timed tasks have been learned, and you can float directly
【LVGL(3)】设置对象大小、位置、盒子模型、状态
带你深入了解MySQL数据库扣减库存原理
DHCP principle and configuration
【波形/信号发生器】基于 STC1524K32S4 for C on Keil
Promise