简体   繁体   English

websocket和websocket-client,如何同时使用?

[英]websocket and websocket-client, how to use both?

I have some packages that rely on the python websocket package https://github.com/aaugustin/websockets 我有一些依赖于python websocket软件包的软件包https://github.com/aaugustin/websockets

Now I would like to install another package that depends on the websocket-client package https://github.com/websocket-client/websocket-client 现在我想安装另一个依赖于websocket-client包https://github.com/websocket-client/websocket-client的

Both packages are using the command 两个软件包都使用命令

from websockets import ...

So right now it doesn't work to use both. 因此,目前无法同时使用两者。 Is there any workaround for that kind of behavior? 有没有针对这种行为的解决方法? Except for forking one of the packages. 除了分叉其中一个程序包。

Thanks! 谢谢!

A quick look at the github links you provided suggests that there should be no problem: 快速浏览您提供的github链接表明应该没有问题:

WebSockets is imported by WebSockets是由导入的

import websockets

websocket-client is imported by websocket-client由导入

import websocket

Notice that there is no "s" in the second case. 请注意,在第二种情况下没有“ s”。 That being said, if you are using them for different projects you should consider using dev environments like virtualenv or conda anyway. 话虽如此,如果您将它们用于不同的项目,则无论如何应考虑使用诸如virtualenvconda类的开发环境。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM