- 创建的虚拟环境:
virtualenv my_test
- 安装横梁:
source bin/activate && pip install crossbar
以下是软件包:
Jinja2==2.8 MarkupSafe==0.23 PyNaCl==1.0.1 PyTrie==0.2 PyYAML==3.11 Pygments==2.1.3 Twisted==16.1.1 argparse==1.2.1 attrs==15.2.0 autobahn==0.13 .1 cbor==1.0.0 cffi==1.5.2 click==6.6 crossbar==0.13.0 cryptography==1.3.1 enum34==1.1.2 idna==2.1 ipaddress==1.0.16 lmdb==0.89 misune==0.7.2 msgpack-python==0.4.7 netaddr==0.7.18 psutil==4.1.0 pyOpenSSL==16.0.0 pyasn1==0.1.9 pyasn1-modules==0.0.8 pycparser==2.14 pyinotify==0.9.6 requests==2.9.1 sdnotify==0.3.0 service-identity==16.0.0 setproctitle==1.1.9 shutilwhich==1.1.0 六==1.10.0 treq==15.1.0 txaio==2.3.1 ujson==1.35 wsaccel==0.6.2 wsgiref==0.1.2 zope.interface==4.1.3
使用以下命令生成 hello 模板:crossbar init --template hello:python --appdir hello
- 试图运行横杆
cd hello; crossbar start
得到错误:
2016-04-13T15:43:20+1000 [Controller 2973] Traceback (most recent call last):
2016-04-13T15:43:20+1000 [Controller 2973] File "/home/romaan/workspacepy/tester/bin/crossbar", line 9, in <module>
2016-04-13T15:43:20+1000 [Controller 2973] load_entry_point('crossbar==0.13.0', 'console_scripts', 'crossbar')()
2016-04-13T15:43:20+1000 [Controller 2973] File "/home/romaan/workspacepy/tester/local/lib/python2.7/site-packages/crossbar/controller/cli.py", line 992, in run
2016-04-13T15:43:20+1000 [Controller 2973] options.func(options, reactor=reactor)
2016-04-13T15:43:20+1000 [Controller 2973] File "/home/romaan/workspacepy/tester/local/lib/python2.7/site-packages/crossbar/controller/cli.py", line 560, in run_command_start
2016-04-13T15:43:20+1000 [Controller 2973] from crossbar.controller.node import maybe_generate_key
2016-04-13T15:43:20+1000 [Controller 2973] File "/home/romaan/workspacepy/tester/local/lib/python2.7/site-packages/crossbar/controller/node.py", line 52, in <module>
2016-04-13T15:43:20+1000 [Controller 2973] from crossbar.worker.router import RouterRealm
2016-04-13T15:43:20+1000 [Controller 2973] File "/home/romaan/workspacepy/tester/local/lib/python2.7/site-packages/crossbar/worker/router.py", line 63, in <module>
2016-04-13T15:43:20+1000 [Controller 2973] from crossbar.worker.testee import WebSocketTesteeServerFactory, \
2016-04-13T15:43:20+1000 [Controller 2973] File "/home/romaan/workspacepy/tester/local/lib/python2.7/site-packages/crossbar/worker/testee.py", line 44, in <module>
2016-04-13T15:43:20+1000 [Controller 2973] from crossbar.worker.worker import NativeWorkerSession
2016-04-13T15:43:20+1000 [Controller 2973] File "/home/romaan/workspacepy/tester/local/lib/python2.7/site-packages/crossbar/worker/worker.py", line 48, in <module>
2016-04-13T15:43:20+1000 [Controller 2973] from crossbar.common.process import NativeProcessSession
2016-04-13T15:43:20+1000 [Controller 2973] File "/home/romaan/workspacepy/tester/local/lib/python2.7/site-packages/crossbar/common/process.py", line 67, in <module>
2016-04-13T15:43:20+1000 [Controller 2973] from crossbar.common import checkconfig
2016-04-13T15:43:20+1000 [Controller 2973] File "/home/romaan/workspacepy/tester/local/lib/python2.7/site-packages/crossbar/common/checkconfig.py", line 44, in <module>
2016-04-13T15:43:20+1000 [Controller 2973] from autobahn.websocket.protocol import parseWsUrl
2016-04-13T15:43:20+1000 [Controller 2973] ImportError: cannot import name parseWsUrl
请帮我修复它。我知道 parseWsUrl 在 autobahn.websocket.protocol 中不存在,但这个错误来自交叉库。因此,我该如何解决?或解决方法?