简体   繁体   中英

How do I resolve error message "no module named websocket"

I have python 2.7

Then did: pip install websocket-client. Successful

In code have: import websocket

Now running code get error: No module named websocket.

Already search for other issues, which did not solve it.

I am not sure if websocket is part of package websocket or of package websocket-client.

Thanks in advance

I found a solution to resolve it.

I had to install it by venv/bin/pip install instead of pip install

我必须通过“pip install websocket-client”的“python setup.py install”安装来安装它,它成功了

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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