Dask Distributed client takes to long to initialize in jupyter lab - python-3.x

Trying to initialize a client with local cluster in Jupyter lab but hangs. This behaviour happens for python 3.5 and jupyter lab 0.35.
import dask.dataframe as dd
from dask import delayed
from distributed import Client
from distributed import LocalCluster
import pandas as pd
import numpy as np
import json
cluster = LocalCluster()
client = Cluster(cluster)
client
versions of the tools :
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
And the jupyter lab version is
pip list |grep jupyter
jupyter 1.0.0
jupyter-client 5.2.3
jupyter-console 6.0.0
jupyter-core 4.4.0
jupyterlab 0.35.3
jupyterlab-server 0.2.0
Dask version
pip list |grep dask
dask 0.20.0
What could be wrong?
EDIT: No exception on the terminal while trying to initialize client
Interrupting the Kernel gives the following exceptions:
Inside jupyter:
distributed.nanny - ERROR - Failed to restart worker after its process exited
Traceback (most recent call last):
File "/home/avlach/virtualenvs/staistics3/lib/python3.5/site-packages/distributed/nanny.py", line 291, in _on_exit
yield self.instantiate()
File "/home/avlach/virtualenvs/staistics3/lib/python3.5/site-packages/tornado/gen.py", line 1133, in run
value = future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
raise self._exception
File "/home/avlach/virtualenvs/staistics3/lib/python3.5/site-packages/tornado/gen.py", line 1141, in run
yielded = self.gen.throw(*exc_info)
File "/home/avlach/virtualenvs/staistics3/lib/python3.5/site-packages/distributed/nanny.py", line 226, in instantiate
self.process.start()
File "/home/avlach/virtualenvs/staistics3/lib/python3.5/site-packages/tornado/gen.py", line 1133, in run
value = future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
raise self._exception
File "/home/avlach/virtualenvs/staistics3/lib/python3.5/site-packages/tornado/gen.py", line 1141, in run
yielded = self.gen.throw(*exc_info)
File "/home/avlach/virtualenvs/staistics3/lib/python3.5/site-packages/distributed/nanny.py", line 370, in start
yield self.process.start()
File "/home/avlach/virtualenvs/staistics3/lib/python3.5/site-packages/tornado/gen.py", line 1133, in run
value = future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
raise self._exception
File "/home/avlach/virtualenvs/staistics3/lib/python3.5/site-packages/distributed/process.py", line 35, in _call_and_set_future
res = func(*args, **kwargs)
File "/home/avlach/virtualenvs/staistics3/lib/python3.5/site-packages/distributed/process.py", line 184, in _start
process.start()
File "/usr/lib/python3.5/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/usr/lib/python3.5/multiprocessing/context.py", line 281, in _Popen
return Popen(process_obj)
File "/usr/lib/python3.5/multiprocessing/popen_forkserver.py", line 36, in __init__
super().__init__(process_obj)
File "/usr/lib/python3.5/multiprocessing/popen_fork.py", line 20, in __init__
self._launch(process_obj)
File "/usr/lib/python3.5/multiprocessing/popen_forkserver.py", line 52, in _launch
self.sentinel, w = forkserver.connect_to_new_process(self._fds)
File "/usr/lib/python3.5/multiprocessing/forkserver.py", line 66, in connect_to_new_process
client.connect(self._forkserver_address)
ConnectionRefusedError: [Errno 111] Connection refused
and on the terminal
Kernel interrupted: 1e7da6ed-2137-41ce-818e-3484c0a659cc
fd_event_list = self._epoll.poll(timeout, max_ev)
KeyboardInterrupt

Related

Problem running Tensorflow (Ubuntu 19.10)

I've recently tried to install and run some python and tensorflow code from this repository.
I followed the manual installation procedure just as mentioned in the README.md present in the repository.
As I've never used tensorflow before, I had to install a lot of packages to get it up and running.
Currently, I've got tensorfow-gpu 1.13, python 3.7, and an Nvidia graphics card (mx250) on my Ubuntu 19.10 laptop, and I wish to get the code running. However, I'm having issues running the demo.sh file present with it.
Here's what I get in the err.txt when I run the command $ bash demo.sh > output.txt 2> err.txt at the cloned directory (after installing all required packages):
*** Aborted at 1575094215 (unix time) try "date -d #1575094215" if you are using GNU date ***
PC: # 0x7f92c7012ae8 ceres::internal::ProgramEvaluator<>::Evaluate()
*** SIGSEGV (#0x0) received by PID 22202 (TID 0x7f92acda5700) from PID 0; stack trace: ***
# 0x7f92c7452641 (unknown)
# 0x7f92c67dd540 (unknown)
# 0x7f92c7012ae8 ceres::internal::ProgramEvaluator<>::Evaluate()
# 0x7f92c709265f ceres::internal::TrustRegionMinimizer::EvaluateGradientAndJacobian()
# 0x7f92c7092f4a ceres::internal::TrustRegionMinimizer::IterationZero()
# 0x7f92c70972d4 ceres::internal::TrustRegionMinimizer::Minimize()
# 0x7f92c7088cbc ceres::Solver::Solve()
# 0x7f92c70899b9 ceres::Solve()
# 0x55bb3bb1a2eb colmap::BundleAdjuster::Solve()
# 0x55bb3bb78037 colmap::IncrementalMapper::AdjustGlobalBundle()
# 0x55bb3bac3f0c (unknown)
# 0x55bb3bac521d colmap::IncrementalMapperController::Reconstruct()
# 0x55bb3bac6a9b colmap::IncrementalMapperController::Run()
# 0x55bb3bbd7dfc colmap::Thread::RunFunc()
# 0x7f92c5ad9f74 (unknown)
# 0x7f92c67d1669 start_thread
# 0x7f92c578f323 clone
Traceback (most recent call last):
File "imgs2poses.py", line 11, in <module>
gen_poses(args.scenedir)
File "/home/abhigyan/Code/CVProject/LLFF/llff/poses/pose_utils.py", line 265, in gen_poses
run_colmap(basedir)
File "/home/abhigyan/Code/CVProject/LLFF/llff/poses/colmap_wrapper.py", line 70, in run_colmap
map_output = ( subprocess.check_output(mapper_args, universal_newlines=True) )
File "/home/abhigyan/anaconda3/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/home/abhigyan/anaconda3/lib/python3.7/subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['colmap', 'mapper', '--database_path', 'data/testscene/database.db', '--image_path', 'data/testscene/images', '--output_path', 'data/testscene/sparse', '--Mapper.num_threads', '16', '--Mapper.init_min_tri_angle', '4', '--Mapper.multiple_models', '0', '--Mapper.extract_colors', '0']' died with <Signals.SIGSEGV: 11>.
Traceback (most recent call last):
File "/home/abhigyan/anaconda3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/abhigyan/anaconda3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/abhigyan/anaconda3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/abhigyan/anaconda3/lib/python3.7/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/abhigyan/anaconda3/lib/python3.7/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "imgs2mpis.py", line 10, in <module>
from llff.inference.mpi_utils import run_inference
File "/home/abhigyan/Code/CVProject/LLFF/llff/inference/mpi_utils.py", line 6, in <module>
from llff.inference.mpi_tester import DeepIBR
File "/home/abhigyan/Code/CVProject/LLFF/llff/inference/mpi_tester.py", line 1, in <module>
import tensorflow as tf
File "/home/abhigyan/anaconda3/lib/python3.7/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/home/abhigyan/anaconda3/lib/python3.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/abhigyan/anaconda3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/abhigyan/anaconda3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/abhigyan/anaconda3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/abhigyan/anaconda3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/abhigyan/anaconda3/lib/python3.7/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/abhigyan/anaconda3/lib/python3.7/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
mkdir: cannot create directory ‘data/testscene/outputs/’: File exists
Traceback (most recent call last):
File "imgs2renderpath.py", line 34, in <module>
poses, bds = load_data(args.scenedir, load_imgs=False)
File "/home/abhigyan/Code/CVProject/LLFF/llff/poses/pose_utils.py", line 195, in load_data
poses_arr = np.load(os.path.join(basedir, 'poses_bounds.npy'))
File "/home/abhigyan/anaconda3/lib/python3.7/site-packages/numpy/lib/npyio.py", line 428, in load
fid = open(os_fspath(file), "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'data/testscene/poses_bounds.npy'
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
demo.sh: line 24: 22221 Aborted (core dumped) cuda_renderer/cuda_renderer data/testscene/mpis_360 data/testscene/outputs/test_path.txt data/testscene/outputs/test_vid.mp4 360 .8 18
When you are going to use Tensorflow in GPU setup, have to carefully install and configure the Tensorflow in your machine. I would like to prefer to use Ubuntu 18.04 LTS version instead of 19.xx.
Follow the installation steps from the blog: https://zhuanlan.zhihu.com/p/49166211

Not able to import matplotlib animation with "Permission denied: 'convert'"

When trying to import animation from matplotlib, we keep getting the following error:
PermissionError: [Errno 13] Permission denied: 'convert'
This is the complete log:
$ python
Python 3.7.4 (default, Aug 13 2019, 15:17:50)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from matplotlib import animation
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/ssy/miniconda3/envs/bao/lib/python3.7/site-packages/matplotlib/animation.py", line 737, in <module>
class ImageMagickWriter(ImageMagickBase, MovieWriter):
File "/Users/ssy/miniconda3/envs/bao/lib/python3.7/site-packages/matplotlib/animation.py", line 120, in wrapper
if writerClass.isAvailable():
File "/Users/ssy/miniconda3/envs/bao/lib/python3.7/site-packages/matplotlib/animation.py", line 730, in isAvailable
return super().isAvailable()
File "/Users/ssy/miniconda3/envs/bao/lib/python3.7/site-packages/matplotlib/animation.py", line 427, in isAvailable
return shutil.which(cls.bin_path()) is not None
File "/Users/ssy/miniconda3/envs/bao/lib/python3.7/site-packages/matplotlib/animation.py", line 724, in bin_path
binpath = mpl._get_executable_info('magick').executable
File "/Users/ssy/miniconda3/envs/bao/lib/python3.7/site-packages/matplotlib/__init__.py", line 384, in _get_executable_info
return impl([path, "--version"], r"^Version: ImageMagick (\S*)")
File "/Users/ssy/miniconda3/envs/bao/lib/python3.7/site-packages/matplotlib/__init__.py", line 324, in impl
args, stderr=subprocess.STDOUT, universal_newlines=True)
File "/Users/ssy/miniconda3/envs/bao/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/Users/ssy/miniconda3/envs/bao/lib/python3.7/subprocess.py", line 472, in run
with Popen(*popenargs, **kwargs) as process:
File "/Users/ssy/miniconda3/envs/bao/lib/python3.7/subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "/Users/ssy/miniconda3/envs/bao/lib/python3.7/subprocess.py", line 1522, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: 'convert'
Any body knows why and how to resolve this?
We are using conda for managing the environment. Other packages all work fine. e.g.
>>> import numpy
>>> import matplotlib
>>> from numpy import arange
These all works fine.

Why running Yolo_v2 on object detection task gives SystemError: unknown opcode?

I was using a pre-trained Yolo model for my object detection project. I have downloaded the weight from someone else google drive and using the "YOLOv2" model from this GitHub repo.
My conda environment configuration:
Python 3.6.7 :: Anaconda, Inc.
keras 2.2.4
Tensorflow 1.13.1 backend
While running the program, I got the below error:
EDIT: Complete traceback
/home/anubh/anaconda3/envs/cMLdev/bin/python /snap/pycharm-professional/121/helpers/pydev/pydevconsole.py --mode=client --port=42727
import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['/home/anubh/PycharmProjects/add_projects/blendid_data_challenge'])
PyDev console: starting.
Python 3.6.7 |Anaconda, Inc.| (default, Oct 23 2018, 19:16:44)
[GCC 7.3.0] on linux
runfile('/home/anubh/PycharmProjects/codingforfun/machine_learning/deepLearningAI-ANG/week3/car_detection_for_autonomous_driving/pretrain_yolo_model_car_detection.py', wdir='/home/anubh/PycharmProjects/codingforfun/machine_learning/deepLearningAI-ANG/week3/car_detection_for_autonomous_driving')
Using TensorFlow backend.
2019-03-20 11:08:41.522694: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
XXX lineno: 31, opcode: 0
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/snap/pycharm-professional/121/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "/snap/pycharm-professional/121/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/anubh/PycharmProjects/codingforfun/machine_learning/deepLearningAI-ANG/week3/car_detection_for_autonomous_driving/pretrain_yolo_model_car_detection.py", line 89, in <module>
main()
File "/home/anubh/PycharmProjects/codingforfun/machine_learning/deepLearningAI-ANG/week3/car_detection_for_autonomous_driving/pretrain_yolo_model_car_detection.py", line 86, in main
out_scores, out_boxes, out_classes = predict(sess, "test.jpg")
File "/home/anubh/PycharmProjects/codingforfun/machine_learning/deepLearningAI-ANG/week3/car_detection_for_autonomous_driving/pretrain_yolo_model_car_detection.py", line 66, in predict
yolo_model,class_names, scores, boxes,classes = build_graph(summary_needed=1)
File "/home/anubh/PycharmProjects/codingforfun/machine_learning/deepLearningAI-ANG/week3/car_detection_for_autonomous_driving/pretrain_yolo_model_car_detection.py", line 30, in build_graph
yolo_model = load_model("model_data/yolo.h5") # (m, 19, 19, 5, 85) tensor
File "/home/anubh/anaconda3/envs/cMLdev/lib/python3.6/site-packages/keras/engine/saving.py", line 419, in load_model
model = _deserialize_model(f, custom_objects, compile)
File "/home/anubh/anaconda3/envs/cMLdev/lib/python3.6/site-packages/keras/engine/saving.py", line 225, in _deserialize_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "/home/anubh/anaconda3/envs/cMLdev/lib/python3.6/site-packages/keras/engine/saving.py", line 458, in model_from_config
return deserialize(config, custom_objects=custom_objects)
File "/home/anubh/anaconda3/envs/cMLdev/lib/python3.6/site-packages/keras/layers/__init__.py", line 55, in deserialize
printable_module_name='layer')
File "/home/anubh/anaconda3/envs/cMLdev/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 145, in deserialize_keras_object
list(custom_objects.items())))
File "/home/anubh/anaconda3/envs/cMLdev/lib/python3.6/site-packages/keras/engine/network.py", line 1032, in from_config
process_node(layer, node_data)
File "/home/anubh/anaconda3/envs/cMLdev/lib/python3.6/site-packages/keras/engine/network.py", line 991, in process_node
layer(unpack_singleton(input_tensors), **kwargs)
File "/home/anubh/anaconda3/envs/cMLdev/lib/python3.6/site-packages/keras/engine/base_layer.py", line 457, in __call__
output = self.call(inputs, **kwargs)
File "/home/anubh/anaconda3/envs/cMLdev/lib/python3.6/site-packages/keras/layers/core.py", line 687, in call
return self.function(inputs, **arguments)
File "/home/don/tensorflow/yad2k/yad2k/models/keras_yolo.py", line 31, in space_to_depth_x2
SystemError: unknown opcode
I found 2 threads 1 & 2 that tries to answer
How to get the TensorFlow binary compiled to support my CPU instructions.
I also found an easy get around at someone's GitHub issue, but the reasoning wasn't clear at all. They are just trying hit & trial.
but, My question is,
In the same environment configuration, I have used ResNet-50 & VGG-16 models for the image classification task, and much other functionality of keras as tensorflow backend and directly with tensorflow. All works with no such error!
Then, what's so special incompatibility Tensorflow issue is with Yolo_v2 model? Could anyone help in this regards as well why and which tensorflow versions would work and how you decide it before working with any model?

IPython Not opening (invalid syntax)

I have installed IPython using the command:
python3.7 -m pip install ipython
And it gave the prompt of successful installation as well but when i try to open IPython using the command:
python3.7 -m IPython
(NOTE: using IPython instead of ipython because that's how it is stored in my system)
I am getting the following error:
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.7/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.7/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/usr/local/lib/python3.7/dist-packages/IPython/__init__.py", line 54, in <module>
from .core.application import Application
File "/usr/local/lib/python3.7/dist-packages/IPython/core/application.py", line 25, in <module>
from IPython.core import release, crashhandler
File "/usr/local/lib/python3.7/dist-packages/IPython/core/crashhandler.py", line 27, in <module>
from IPython.core import ultratb
File "/usr/local/lib/python3.7/dist-packages/IPython/core/ultratb.py", line 119, in <module>
from IPython.utils import path as util_path
File "/usr/local/lib/python3.7/dist-packages/IPython/utils/path.py", line 17, in <module>
from IPython.utils.process import system
File "/usr/local/lib/python3.7/dist-packages/IPython/utils/process.py", line 19, in <module>
from ._process_posix import system, getoutput, arg_split, check_pid
File "/usr/local/lib/python3.7/dist-packages/IPython/utils/_process_posix.py", line 23, in <module>
import pexpect
File "/usr/lib/python3/dist-packages/pexpect/__init__.py", line 75, in <module>
from .pty_spawn import spawn, spawnu
File "/usr/lib/python3/dist-packages/pexpect/pty_spawn.py", line 15, in <module>
from .spawnbase import SpawnBase
File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 218
def expect(self, pattern, timeout=-1, searchwindowsize=-1, async=False):
^
SyntaxError: invalid syntax
Download pexpect4.6 source code from https://github.com/pexpect/pexpect/releases/tag/4.6
Extract the source code, get into the folder and install the pexpect by:
sudo python3.7 setup.py install
This should solve your problem. :)

CNTK on Jupyter notebook kernal not working

I am trying to get Jupyter Notebook to work with my Azure data Science VM and the kernel in not working. I installes CNTK using the shellbash and it works well from the command like. However when I pull it up using Anaconda or with the command: "jupyter notebook" I get this error:
Traceback (most recent call last):
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site- packages\notebook\base\handlers.py", line 503, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site- packages\tornado\gen.py", line 1015, in run
value = future.result()
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\notebook\services\sessions\handlers.py", line 75, in post
type=mtype))
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 1015, in run
value = future.result()
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 79, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 1015, in run
value = future.result()
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 92, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 1015, in run
value = future.result()
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 285, in wrapper
yielded = next(result)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 87, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\jupyter_client\manager.py", line 243, in start_kernel
**kw)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\jupyter_client\manager.py", line 189, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\jupyter_client\launcher.py", line 123, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\subprocess.py", line 1224, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
Any advice on how to get the python kernel to work with CNTK in the notebook?
I opened up the terminal to the CNTK-py35 directory and entered the following code and the kernel started working got it working:
conda create -n py35 python=3.5
activate py35
conda install notebook ipykernel
ipython kernel install --user --name=python3.5
Then I opened jupyter notebook from inside Anaconda and ran
import CNTK
Need a bit more information to give you meaningful advice, as I cannot see it from the screen dump.
Are you able to activate CNTK-py35 environment
If you are able to activate the environment, could you please start the python kernel from within the activated environment
If you are successful with that from within the python shell are you able to run import CNTK
If that works, that means your CNTK installation is good.
Now you can go the command prompt, from within the activate environment can you try starting the jupyter notebook environment.
You can find more information along these lines for the python setup, at this link: https://github.com/Microsoft/CNTK/wiki/Setup-Windows-Python

Resources