Jupyter - failed to start the kernel - anaconda

i am suddenly getting the following error when trying to launch a jupyter-notebook: "Failed to start the kernel"- Unhandled error. Any ideas how to fix this?
Traceback (most recent call last):
File "C:\Users\USER\AppData\Local\Continuum\anaconda3\lib\site-packages\tornado\web.py", line 1699, in _execute
result = await result
File "C:\Users\USER\AppData\Local\Continuum\anaconda3\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\Users\USER\AppData\Local\Continuum\anaconda3\lib\site-packages\notebook\services\sessions\handlers.py", line 72, in post
type=mtype))
File "C:\Users\USER\AppData\Local\Continuum\anaconda3\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "C:\Users\USER\AppData\Local\Continuum\anaconda3\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\Users\USER\AppData\Local\Continuum\anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 88, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "C:\Users\USER\AppData\Local\Continuum\anaconda3\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "C:\Users\USER\AppData\Local\Continuum\anaconda3\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\Users\USER\AppData\Local\Continuum\anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 101, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "C:\Users\USER\AppData\Local\Continuum\anaconda3\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "C:\Users\USER\AppData\Local\Continuum\anaconda3\lib\site-packages\tornado\gen.py", line 209, in wrapper
yielded = next(result)
File "C:\Users\USER\AppData\Local\Continuum\anaconda3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "C:\Users\USER\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "C:\Users\USER\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyter_client\manager.py", line 259, in start_kernel
**kw)
File "C:\Users\USER\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyter_client\manager.py", line 204, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "C:\Users\USER\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyter_client\launcher.py", line 138, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\Users\USER\AppData\Local\Continuum\anaconda3\lib\subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "C:\Users\USER\AppData\Local\Continuum\anaconda3\lib\subprocess.py", line 1178, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] Das System kann die angegebene Datei nicht finden

typing the following command in the anaconda prompt solved the issue:
python -m ipykernel install --user

Related

conda 4.7.12: conda update -n base conda fails

I am working with conda version 4.7.12. Running the command conda update -n base conda failed. I am getting the same result when trying to update other environments as well, but the problem seemed to start when this command failed the first time. The output is:
$ conda update -n base conda
Collecting package metadata (current_repodata.json): failed
WARNING conda.exceptions:print_unexpected_error_report(1208): KeyError(u'pkgs_dirs',)
Traceback (most recent call last):
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/exceptions.py", line 1206, in print_unexpected_error_report
message_builder.append(get_main_info_str(error_report['conda_info']))
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/cli/main_info.py", line 236, in get_main_info_str
info_dict['_' + key] = ('\n' + 26 * ' ').join(info_dict[key])
KeyError: u'pkgs_dirs'
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/exceptions.py", line 1074, in __call__
return func(*args, **kwargs)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/cli/main.py", line 84, in _main
exit_code = do_call(args, p)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/cli/conda_argparse.py", line 82, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/cli/main_update.py", line 20, in execute
install(args, parser, 'update')
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/cli/install.py", line 265, in install
should_retry_solve=(_should_retry_unfrozen or repodata_fn != repodata_fns[-1]),
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/core/solve.py", line 117, in solve_for_transaction
should_retry_solve)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/core/solve.py", line 158, in solve_for_diff
force_remove, should_retry_solve)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/core/solve.py", line 262, in solve_final_state
ssc = self._collect_all_metadata(ssc)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/common/io.py", line 88, in decorated
return f(*args, **kwds)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/core/solve.py", line 415, in _collect_all_metadata
index, r = self._prepare(prepared_specs)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/core/solve.py", line 1004, in _prepare
self.subdirs, prepared_specs, self._repodata_fn)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/core/index.py", line 250, in get_reduced_index
_supplement_index_with_system(reduced_index)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/core/index.py", line 155, in _supplement_index_with_system
cuda_version = context.cuda_version
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/_vendor/auxlib/decorators.py", line 268, in new_fget
cache[inner_attname] = func(self)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/common/decorators.py", line 20, in wrapper
return func(*args, **kwargs)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/base/context.py", line 770, in cuda_version
return cuda_detect()
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/common/cuda.py", line 19, in cuda_detect
system = platform.system()
AttributeError: 'module' object has no attribute 'system'
`$ /home/XXXXXX/miniconda/bin/conda update -n base conda`
environment variables:
conda info could not be constructed.
KeyError(u'pkgs_dirs',)
An unexpected error has occurred. Conda has prepared the above report.

Hortonworks HDP 3 : Error starting ResourceManager

I have installed a new cluster HDP 3 using ambari 2.7.
The problem is that resource manager service is not starting.
I get the following error:
Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/YARN/package/scripts/resourcemanager.py", line 275, in <module>
Resourcemanager().execute()
File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 353, in execute
method(env)
File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/YARN/package/scripts/resourcemanager.py", line 158, in start
service('resourcemanager', action='start')
File "/usr/lib/ambari-agent/lib/ambari_commons/os_family_impl.py", line 89, in thunk
return fn(*args, **kwargs)
File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/YARN/package/scripts/service.py", line 92, in service
Execute(daemon_cmd, user = usr, not_if = check_process)
File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 166, in __init__
self.env.run()
File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 160, in run
self.run_action(resource, action)
File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 124, in run_action
provider_action()
File "/usr/lib/ambari-agent/lib/resource_management/core/providers/system.py", line 263, in action_run
returns=self.resource.returns)
File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 72, in inner
result = function(command, **kwargs)
File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 102, in checked_call
tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy, returns=returns)
File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 150, in _call_wrapper
result = _call(command, **kwargs_copy)
File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 314, in _call
raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of 'ulimit -c unlimited; export HADOOP_LIBEXEC_DIR=/usr/hdp/3.0.0.0-1634/hadoop/libexec && /usr/hdp/3.0.0.0-1634/hadoop-yarn/bin/yarn --config /usr/hdp/3.0.0.0-1634/hadoop/conf --daemon start resourcemanager' returned 1.

Permission denied error while installing pixiedust jupyter

Team, im getting permission denied error [Errno 13] Permission denied while extracting spark package (2.1.0) in local installation. I have admin access to folders and verified in Security as well. Any pointers will be helpful
Environment details
OS - **Windows 7**
(C:\conda) C:\conda>conda --version
**conda 4.3.30**
(C:\conda) C:\conda>python --version
**Python 3.6.3 :: Anaconda, Inc.**
(C:\conda) C:\conda>jupyter --version
**4.3.0**
(C:\conda) C:\conda>pip --version
**pip 9.0.1** from C:\conda\lib\site-packages (python 3.6)
From anaconda terminal - jupyter pixiedust install
←[32;1mStep 1: **PIXIEDUST_HOME**: C:\conda\pixiedust-master←[0m
Keep y/n [y]? **y**
←[32;1mStep 2: **SPARK_HOME**: C:\conda\pixiedust-master\bin\spark←[0m
Keep y/n [y]? y
←[32;1mDirectory C:\conda\pixiedust-master\bin\spark does not contain a valid SPARK install←[0m
**Download Spark** y/n [y]? y
←[32;1mWhat version would you like to download? 1.6.3, 2.0.2, 2.1.0, 2.2.0 [2.2.0]: ←[0m**2.1.0**
F 82%
F 100%
Error Details - Below
←[FExtracting Spark 2.1.0 to C:\conda\pixiedust-master\bin\spark
Traceback (most recent call last): File "c:\conda\lib\runpy.py",
line 193, in _run_module_as_main
"main", mod_spec)
File "c:\conda\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\conda\Scripts\jupyter-pixiedust.EXE__main__.py", line 9,
in
File "c:\conda\lib\site-packages\install\pixiedustapp.py", line 41,
in main
PixiedustJupyterApp.launch_instance()
File "c:\conda\lib\site-packages\traitlets\config\application.py",
line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "c:\conda\lib\site-packages\traitlets\config\application.py",
line 87, in catch_config_error
return method(app, *args, **kwargs)
File "c:\conda\lib\site-packages\traitlets\config\application.py",
line 296, in initialize
self.parse_command_line(argv)
File "", line 2, in parse_command_line
File "c:\conda\lib\site-packages\traitlets\config\application.py",
line 87, in catch_config_error
return method(app, *args, **kwargs)
File "c:\conda\lib\site-packages\traitlets\config\application.py",
line 514, in parse_command_line
return self.initialize_subcommand(subc, subargv)
File "", line 2, in initialize_subcommand
File "c:\conda\lib\site-packages\traitlets\config\application.py",
line 87, in catch_config_error
return method(app, *args, **kwargs)
File "c:\conda\lib\site-packages\traitlets\config\application.py",
line 452, in initialize_subcommand
self.subapp.initialize(argv)
File "", line 2, in initialize
File "c:\conda\lib\site-packages\traitlets\config\application.py",
line 87, in catch_config_error
return method(app, *args, **kwargs)
File "c:\conda\lib\site-packages\jupyter_core\application.py", line
239, in initialize
self.parse_command_line(argv)
File "c:\conda\lib\site-packages\install\createKernel.py", line 150,
in parse_command_line
self.download_spark(silent, silent_spark_version)
File "c:\conda\lib\site-packages\install\createKernel.py", line 409,
in download_spark
self.extract_temp_file(temp_file, self.spark_home)
File "c:\conda\lib\site-packages\install\createKernel.py", line 478,
in extract_temp_file
tar = tarfile.open(temp_file.name, "r:gz")
File "c:\conda\lib\tarfile.py", line 1586, in open
return func(name, filemode, fileobj, **kwargs)
File "c:\conda\lib\tarfile.py", line 1633, in gzopen
fileobj = gzip.GzipFile(name, mode + "b", compresslevel, fileobj)
File "c:\conda\lib\gzip.py", line 163, in init
fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
PermissionError: [Errno 13] Permission denied: 'C:\Temp\tmpnt0i718r.tgz'
Unfortunately, Windows is not a supported platform by the PixieDust install script as mentioned in the PixieDust site documentation: https://ibm-watson-data-lab.github.io/pixiedust/install.html.
As a workaround I suggest to use a docker container with Linux or MacOS.

GitPython log() Error

I have a problem with the method log()
repo = git.Repo(repo_path)
branch = repo.head
log = branch.log()
print log
Error:
Traceback (most recent call last): File "gitpython.py",
line 29, in <module log = branch.log() File
"/usr/local/lib/python2.7/dist-packages/GitPython-2.0.9dev0-py2.7.egg/git/refs/symbolic.py", line 361, in log
return RefLog.from_file(RefLog.path(self)) File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.9dev0-py2.7.egg/git/refs/log.py",
line 179, in from_file
return cls(filepath) File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.9dev0-py2.7.egg/git/refs/log.py",
line 153, in __init__
self._read_from_file() File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.9dev0-py2.7.egg/git/refs/log.py",
line 165, in _read_from_file
self._deserialize(fmap) File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.9dev0-py2.7.egg/git/refs/log.py",
line 318, in _deserialize
self.extend(self.iter_entries(stream)) File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.9dev0-py2.7.egg/git/refs/log.py",
line 205, in iter_entries
yield new_entry(line.strip()) File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.9dev0-py2.7.egg/git/refs/log.py",
line 123, in from_line
raise ValueError("Missing token: >") ValueError: Missing token: >
Did you update gitpython?
File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.9dev0-py2.7.egg/git/refs/log.py",
line 123, in from_line
raise ValueError("Missing token: >") ValueError: Missing token: >
Seems to indicate something wrong in the log.py file.

Errors installing pip on windows

I was trying to install pip on windows in the windows command-line but when I test it, it gives me this error:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xea' in position 11:
ordinal not in range(128)
Here is the whole error:
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\pip.exe\__main__.py", line 9, in <module>
File "c:\python27\lib\site-packages\pip\__init__.py", line 207, in main
cmd_name, cmd_args = parseopts(args)
File "c:\python27\lib\site-packages\pip\__init__.py", line 166, in parseopts
parser.print_help()
File "c:\python27\lib\optparse.py", line 1670, in print_help
file.write(self.format_help().encode(encoding, "replace"))
File "c:\python27\lib\optparse.py", line 1650, in format_help
result.append(self.format_option_help(formatter))
File "c:\python27\lib\optparse.py", line 1633, in format_option_help
result.append(group.format_help(formatter))
File "c:\python27\lib\optparse.py", line 1114, in format_help
result += OptionContainer.format_help(self, formatter)
File "c:\python27\lib\optparse.py", line 1085, in format_help
result.append(self.format_option_help(formatter))
File "c:\python27\lib\optparse.py", line 1074, in format_option_help
result.append(formatter.format_option(option))
File "c:\python27\lib\optparse.py", line 316, in format_option
help_text = self.expand_default(option)
File "c:\python27\lib\site-packages\pip\baseparser.py", line 112, in expand_de
fault
return optparse.IndentedHelpFormatter.expand_default(self, option)
File "c:\python27\lib\optparse.py", line 288, in expand_default
return option.help.replace(self.default_tag, str(default_value))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xea' in position 11:
ordinal not in range(128)

Resources