Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requirements.txt中有两个依赖存在 模块冲突 #286

Open
unsatisfying opened this issue Jul 30, 2023 · 1 comment
Open

requirements.txt中有两个依赖存在 模块冲突 #286

unsatisfying opened this issue Jul 30, 2023 · 1 comment
Assignees
Labels
bug 我的锅

Comments

@unsatisfying
Copy link

描述

在requirements.txt中有两个依赖websocket和websocket-client。这两个包存在模块冲突。安装websocket时在site-packages文件夹中(安装第三方软件包的默认文件夹)会安装websocket/__init__.py模块。随后再安装websocket-client包时(同样存在websocket/__init__.py模块),会将websocket包的websocket/__init__.py模块覆盖。值得注意的是这两个包中的该模块文件内容并不相同。

复现

pip install -r requirements.txt

修改

我不确定这种覆盖问题会对本项目造成什么样的影响,因为它可能会隐藏在深层的调用链中,至少是想要import websocket模块时,实际它已经被覆盖了。例如你想调用websocket包中的websocket/__init__.py模块, 然而由于它被覆盖了,于是调用的是websocket-client包的websocket/__init__.py模块。所以覆盖行为肯定会发生。并且这样的冲突也可能没有确切的影响。因为不一定import websocket。所以也请确认后麻烦给我回复一个确认该覆盖行为的commits。对于本项目代码我不是很熟悉,但是我想应该可以删除其中一个依赖来解决可能发生的威胁。

@unsatisfying unsatisfying added the bug 我的锅 label Jul 30, 2023
@abao168899
Copy link

会出现内容错乱

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 我的锅
Projects
None yet
Development

No branches or pull requests

3 participants