Created
May 7, 2015 09:51
-
-
Save kain88-de/501558bf18142fc863c2 to your computer and use it in GitHub Desktop.
ipython zmq error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"'0.70a1'" | |
] | |
}, | |
"execution_count": 1, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"import multiprocessing as mp\n", | |
"mp.__version__" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"(3, 1, 0, '')" | |
] | |
}, | |
"execution_count": 2, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"import IPython\n", | |
"IPython.version_info" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"(2, 2, 0)" | |
] | |
}, | |
"execution_count": 3, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"import zmq\n", | |
"zmq.zmq_version_info()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"pool = mp.Pool(processes=4)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"def cube(x): return x **3 " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ | |
"pool.map(cube, range(8))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 2", | |
"language": "python", | |
"name": "python2" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 2 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython2", | |
"version": "2.7.9" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 0 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ZMQError Traceback (most recent call last) | |
/usr/lib/python2.7/runpy.pyc in _run_module_as_main(mod_name='IPython.kernel.__main__', alter_argv=1) | |
160 sys.argv[0] = fname | |
161 return _run_code(code, main_globals, None, | |
--> 162 "__main__", fname, loader, pkg_name) | |
fname = '/home/kain88/.local/lib/python2.7/site-packages/IPython/kernel/__main__.py' | |
loader = <pkgutil.ImpLoader instance at 0x7fa32c00cbd8> | |
pkg_name = 'IPython.kernel' | |
163 | |
164 def run_module(mod_name, init_globals=None, | |
/usr/lib/python2.7/runpy.pyc in _run_code(code=<code object <module> at 0x7fa33216ceb0, file "/...ite-packages/IPython/kernel/__main__.py", line 1>, run_globals={'__builtins__': <module '__builtin__' (built-in)>, '__doc__': None, '__file__': '/home/kain88/.local/lib/python2.7/site-packages/IPython/kernel/__main__.py', '__loader__': <pkgutil.ImpLoader instance>, '__name__': '__main__', '__package__': 'IPython.kernel', 'app': <module 'IPython.kernel.zmq.kernelapp' from '/ho.../site-packages/IPython/kernel/zmq/kernelapp.pyc'>}, init_globals=None, mod_name='__main__', mod_fname='/home/kain88/.local/lib/python2.7/site-packages/IPython/kernel/__main__.py', mod_loader=<pkgutil.ImpLoader instance>, pkg_name='IPython.kernel') | |
70 __loader__ = mod_loader, | |
71 __package__ = pkg_name) | |
---> 72 exec code in run_globals | |
code = <code object <module> at 0x7fa33216ceb0, file "/home/kain88/.local/lib/python2.7/site-packages/IPython/kernel/__main__.py", line 1> | |
run_globals = {'__builtins__': <module '__builtin__' (built-in)>, '__file__': '/home/kain88/.local/lib/python2.7/site-packages/IPython/kernel/__main__.py', '__package__': 'IPython.kernel', '__name__': '__main__', 'app': <module 'IPython.kernel.zmq.kernelapp' from '/home/kain88/.local/lib/python2.7/site-packages/IPython/kernel/zmq/kernelapp.pyc'>, '__loader__': <pkgutil.ImpLoader instance at 0x7fa32c00cbd8>, '__doc__': None} | |
73 return run_globals | |
74 | |
/home/kain88/.local/lib/python2.7/site-packages/IPython/kernel/__main__.py in <module>() | |
1 if __name__ == '__main__': | |
2 from IPython.kernel.zmq import kernelapp as app | |
----> 3 app.launch_new_instance() | |
global app.launch_new_instance = <bound method MetaHasTraits.launch_instance of <class 'IPython.kernel.zmq.kernelapp.IPKernelApp'>> | |
/home/kain88/.local/lib/python2.7/site-packages/IPython/config/application.pyc in launch_instance(cls=<class 'IPython.kernel.zmq.kernelapp.IPKernelApp'>, argv=None, **kwargs={}) | |
571 """ | |
572 app = cls.instance(**kwargs) | |
--> 573 app.initialize(argv) | |
app.initialize = <bound method IPKernelApp.initialize of <IPython.kernel.zmq.kernelapp.IPKernelApp object at 0x7fa32bf5df10>> | |
argv = None | |
574 app.start() | |
575 | |
/home/kain88/.local/lib/python2.7/site-packages/IPython/kernel/zmq/kernelapp.pyc in initialize(self=<IPython.kernel.zmq.kernelapp.IPKernelApp object>, argv=None) | |
/home/kain88/.local/lib/python2.7/site-packages/IPython/config/application.pyc in catch_config_error(method=<function initialize>, app=<IPython.kernel.zmq.kernelapp.IPKernelApp object>, *args=(None,), **kwargs={}) | |
73 """ | |
74 try: | |
---> 75 return method(app, *args, **kwargs) | |
method = <function initialize at 0x7fa32bf67668> | |
app = <IPython.kernel.zmq.kernelapp.IPKernelApp object at 0x7fa32bf5df10> | |
args = (None,) | |
kwargs = {} | |
76 except (TraitError, ArgumentError) as e: | |
77 app.print_help() | |
/home/kain88/.local/lib/python2.7/site-packages/IPython/kernel/zmq/kernelapp.pyc in initialize(self=<IPython.kernel.zmq.kernelapp.IPKernelApp object>, argv=None) | |
346 self.init_connection_file() | |
347 self.init_poller() | |
--> 348 self.init_sockets() | |
self.init_sockets = <bound method IPKernelApp.init_sockets of <IPython.kernel.zmq.kernelapp.IPKernelApp object at 0x7fa32bf5df10>> | |
349 self.init_heartbeat() | |
350 # writing/displaying connection info must be *after* init_sockets/heartbeat | |
/home/kain88/.local/lib/python2.7/site-packages/IPython/kernel/zmq/kernelapp.pyc in init_sockets(self=<IPython.kernel.zmq.kernelapp.IPKernelApp object>) | |
214 self.shell_socket = context.socket(zmq.ROUTER) | |
215 self.shell_socket.linger = 1000 | |
--> 216 self.shell_port = self._bind_socket(self.shell_socket, self.shell_port) | |
self.shell_port = 40196 | |
self._bind_socket = <bound method IPKernelApp._bind_socket of <IPython.kernel.zmq.kernelapp.IPKernelApp object at 0x7fa32bf5df10>> | |
self.shell_socket = <zmq.sugar.socket.Socket object at 0x7fa32bf4a328> | |
217 self.log.debug("shell ROUTER Channel on port: %i" % self.shell_port) | |
218 | |
/home/kain88/.local/lib/python2.7/site-packages/IPython/kernel/zmq/kernelapp.pyc in _bind_socket(self=<IPython.kernel.zmq.kernelapp.IPKernelApp object>, s=<zmq.sugar.socket.Socket object>, port=40196) | |
158 port = s.bind_to_random_port(iface) | |
159 else: | |
--> 160 s.bind("tcp://%s:%i" % (self.ip, port)) | |
s.bind = <built-in method bind of Socket object at 0x7fa32bf4a328> | |
self.ip = u'127.0.0.1' | |
port = 40196 | |
161 elif self.transport == 'ipc': | |
162 if port <= 0: | |
zmq/backend/cython/socket.pyx in zmq.backend.cython.socket.Socket.bind (zmq/backend/cython/socket.c:4102)() | |
/home/kain88/.local/lib/python2.7/site-packages/zmq/backend/cython/checkrc.pxd in zmq.backend.cython.checkrc._check_rc (zmq/backend/cython/socket.c:6261)() | |
19 else: | |
20 from zmq.error import ZMQError | |
---> 21 raise ZMQError(errno) | |
global ZMQError = <class 'zmq.error.ZMQError'> | |
global errno = undefined | |
22 # return -1 | |
23 return 0 | |
ZMQError: Address already in use |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment