Python 在CentOS7中,AttributeError:module';socketio';没有属性';服务器';
我有一个Django项目,我使用git推送到远程回购 我已在我的远程repo(远程服务器为CentOS7.2)中安装了Python 在CentOS7中,AttributeError:module';socketio';没有属性';服务器';,python,Python,我有一个Django项目,我使用git推送到远程回购 我已在我的远程repo(远程服务器为CentOS7.2)中安装了python socketio,执行时: (venv_dist) xxx$ python3 manage.py runserver 我得到以下错误: AttributeError:模块“socketio”没有属性“Server” 但是,如果在本地repo中,我在本地repovenv中安装了pythonsocketio,我就可以执行python3manage.py runserv
python socketio
,执行时:
(venv_dist) xxx$ python3 manage.py runserver
我得到以下错误:
AttributeError:模块“socketio”没有属性“Server”
但是,如果在本地repo中,我在本地repovenv
中安装了pythonsocketio
,我就可以执行python3manage.py runserver
success
为什么在远程我不能执行成功
相关代码为:
import os
from django.http import HttpResponse
import socketio
basedir = os.path.dirname(os.path.realpath(__file__))
sio = socketio.Server(async_mode=async_mode)
thread = None
编辑-1
# pip3 show python-socketio
Name: python-socketio
Version: 1.9.0
Summary: Socket.IO server
Home-page: http://github.com/miguelgrinberg/python-socketio/
Author: Miguel Grinberg
Author-email: miguelgrinberg50@gmail.com
License: MIT
Location: /home/lll/repo/myProject/venv_dist/lib/python3.5/site-packages
Requires: python-engineio, six
Required-by:
你可以做的几件事
- 检查所有库文件所在的站点包文件夹-我猜套接字和其他库将有.egg文件
- 卸载所有相关库并重新安装李>
- 确保安装一次。如果已经安装,则应始终使用upgrade命令
socketio.\uuu版本\uu
返回什么?远程服务器上的pip3 show python socketio
的输出是什么?