I am aiming to analyse geodata in python but fail on step 1: the installation. I'm relatively new to python and used to installing packages with pip. Now, for geopandas, it looks like I'm supposed to use conda install. Sadly, I get an error.
What I did: I downloaded the most recent anconda software and typed 'conda install geopandas' in the anaconda prompt (anaconda3).
Reading similar questions online I saw some questions solved by updating anaconda, but since I downloaded the version on the homepage I would expect it to be up to date. Also, I didn't find any entries with error code similar to mine.
From what I gather from the response, anaconda didn't even manage to find the package (first line of the below code). However, I am not very experienced in the analysis of error code.
Any help would be greatly appreciated!
The error-code
Collecting package metadata (current_repodata.json): failed
WARNING conda.exceptions:print_unexpected_error_report(1213): KeyError('pkgs_dirs')
Traceback (most recent call last):
File "D:\Programs\Anaconda3\lib\site-packages\conda\exceptions.py", line 1079, in __call__
return func(*args, **kwargs)
File "D:\Programs\Anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
exit_code = do_call(args, p)
File "D:\Programs\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 83, in do_call
return getattr(module, func_name)(args, parser)
File "D:\Programs\Anaconda3\lib\site-packages\conda\cli\main_install.py", line 20, in execute
install(args, parser, 'install')
File "D:\Programs\Anaconda3\lib\site-packages\conda\cli\install.py", line 261, in install
unlink_link_transaction = solver.solve_for_transaction(
File "D:\Programs\Anaconda3\lib\site-packages\conda\core\solve.py", line 114, in solve_for_transaction
unlink_precs, link_precs = self.solve_for_diff(update_modifier, deps_modifier,
File "D:\Programs\Anaconda3\lib\site-packages\conda\core\solve.py", line 157, in solve_for_diff
final_precs = self.solve_final_state(update_modifier, deps_modifier, prune, ignore_pinned,
File "D:\Programs\Anaconda3\lib\site-packages\conda\core\solve.py", line 262, in solve_final_state
ssc = self._collect_all_metadata(ssc)
File "D:\Programs\Anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
return f(*args, **kwds)
File "D:\Programs\Anaconda3\lib\site-packages\conda\core\solve.py", line 425, in _collect_all_metadata
index, r = self._prepare(prepared_specs)
File "D:\Programs\Anaconda3\lib\site-packages\conda\core\solve.py", line 1020, in _prepare
reduced_index = get_reduced_index(self.prefix, self.channels,
File "D:\Programs\Anaconda3\lib\site-packages\conda\core\index.py", line 276, in get_reduced_index
new_records = SubdirData.query_all(spec, channels=channels, subdirs=subdirs,
File "D:\Programs\Anaconda3\lib\site-packages\conda\core\subdir_data.py", line 98, in query_all
create_cache_dir()
File "D:\Programs\Anaconda3\lib\site-packages\conda\core\subdir_data.py", line 674, in create_cache_dir
cache_dir = join(PackageCacheData.first_writable().pkgs_dir, 'cache')
File "D:\Programs\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 152, in first_writable
pkgs_dirs = context.pkgs_dirs
File "D:\Programs\Anaconda3\lib\site-packages\conda\base\context.py", line 520, in pkgs_dirs
fixed_dirs += user_data_dir(APP_NAME, APP_NAME),
File "D:\Programs\Anaconda3\lib\site-packages\conda\_vendor\appdirs.py", line 67, in user_data_dir
path = os.path.join(_get_win_folder(const), appauthor, appname)
File "D:\Programs\Anaconda3\lib\site-packages\conda\_vendor\appdirs.py", line 284, in _get_win_folder_with_pywin32
from win32com.shell import shellcon, shell
ImportError: DLL load failed while importing shell: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Programs\Anaconda3\lib\site-packages\conda\exceptions.py", line 1211, in print_unexpected_error_report
message_builder.append(get_main_info_str(error_report['conda_info']))
File "D:\Programs\Anaconda3\lib\site-packages\conda\cli\main_info.py", line 238, in get_main_info_str
info_dict['_' + key] = ('\n' + 26 * ' ').join(info_dict[key])
KeyError: 'pkgs_dirs'
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "D:\Programs\Anaconda3\lib\site-packages\conda\exceptions.py", line 1079, in __call__
return func(*args, **kwargs)
File "D:\Programs\Anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
exit_code = do_call(args, p)
File "D:\Programs\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 83, in do_call
return getattr(module, func_name)(args, parser)
File "D:\Programs\Anaconda3\lib\site-packages\conda\cli\main_install.py", line 20, in execute
install(args, parser, 'install')
File "D:\Programs\Anaconda3\lib\site-packages\conda\cli\install.py", line 261, in install
unlink_link_transaction = solver.solve_for_transaction(
File "D:\Programs\Anaconda3\lib\site-packages\conda\core\solve.py", line 114, in solve_for_transaction
unlink_precs, link_precs = self.solve_for_diff(update_modifier, deps_modifier,
File "D:\Programs\Anaconda3\lib\site-packages\conda\core\solve.py", line 157, in solve_for_diff
final_precs = self.solve_final_state(update_modifier, deps_modifier, prune, ignore_pinned,
File "D:\Programs\Anaconda3\lib\site-packages\conda\core\solve.py", line 262, in solve_final_state
ssc = self._collect_all_metadata(ssc)
File "D:\Programs\Anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
return f(*args, **kwds)
File "D:\Programs\Anaconda3\lib\site-packages\conda\core\solve.py", line 425, in _collect_all_metadata
index, r = self._prepare(prepared_specs)
File "D:\Programs\Anaconda3\lib\site-packages\conda\core\solve.py", line 1020, in _prepare
reduced_index = get_reduced_index(self.prefix, self.channels,
File "D:\Programs\Anaconda3\lib\site-packages\conda\core\index.py", line 276, in get_reduced_index
new_records = SubdirData.query_all(spec, channels=channels, subdirs=subdirs,
File "D:\Programs\Anaconda3\lib\site-packages\conda\core\subdir_data.py", line 98, in query_all
create_cache_dir()
File "D:\Programs\Anaconda3\lib\site-packages\conda\core\subdir_data.py", line 674, in create_cache_dir
cache_dir = join(PackageCacheData.first_writable().pkgs_dir, 'cache')
File "D:\Programs\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 152, in first_writable
pkgs_dirs = context.pkgs_dirs
File "D:\Programs\Anaconda3\lib\site-packages\conda\base\context.py", line 520, in pkgs_dirs
fixed_dirs += user_data_dir(APP_NAME, APP_NAME),
File "D:\Programs\Anaconda3\lib\site-packages\conda\_vendor\appdirs.py", line 67, in user_data_dir
path = os.path.join(_get_win_folder(const), appauthor, appname)
File "D:\Programs\Anaconda3\lib\site-packages\conda\_vendor\appdirs.py", line 284, in _get_win_folder_with_pywin32
from win32com.shell import shellcon, shell
ImportError: DLL load failed while importing shell: The specified module could not be found.
`$ D:\Programs\Anaconda3\Scripts\conda-script.py install geopandas`
environment variables:
conda info could not be constructed.
KeyError('pkgs_dirs')
An unexpected error has occurred. Conda has prepared the above report.
I had the same issue back then, and I followed the instructions on this link.
https://medium.com/analytics-vidhya/fastest-way-to-install-geopandas-in-jupyter-notebook-on-windows-8f734e11fa2b
Basically what this does is create a new environment in your anaconda navigator where I could get geopandas working normally.
Related
I am unable to delete or create or activate python env due to following error:
anand#DESKTOP-UHNCL5C MINGW64 ~
$ source activate PythonAdv
WARNING conda.exceptions:print_unexpected_error_report(1251): KeyError('pkgs_dirs')
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\exceptions.py", line 1129, in call
return func(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\main.py", line 111, in main_sourced
print(activator.execute(), end="")
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\activate.py", line 167, in execute
return getattr(self, self.command)()
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\activate.py", line 141, in activate
builder_result = self.build_activate(self.env_name_or_prefix)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\activate.py", line 288, in build_activate
return self._build_activate_stack(env_name_or_prefix, False)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\activate.py", line 303, in _build_activate_stack
prefix = locate_prefix_by_name(env_name_or_prefix)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\base\context.py", line 1730, in locate_prefix_by_name
envs_dirs = context.envs_dirs
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\base\context.py", line 542, in envs_dirs
return mockable_context_envs_dirs(self.root_writable, self.root_prefix, self._envs_dirs)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\base\context.py", line 114, in mockable_context_envs_dirs
fixed_dirs += join(user_data_dir(APP_NAME, APP_NAME), 'envs'),
File "C:\ProgramData\Anaconda3\lib\site-packages\conda_vendor\appdirs.py", line 67, in user_data_dir
path = os.path.join(_get_win_folder(const), appauthor, appname)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda_vendor\appdirs.py", line 265, in _get_win_folder_with_pywin32
from win32com.shell import shellcon, shell
ImportError: DLL load failed while importing shell: The specified procedure could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\exceptions.py", line 1249, in print_unexpected_error_report
message_builder.append(get_main_info_str(error_report['conda_info']))
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\main_info.py", line 237, in get_main_info_str
info_dict['_' + key] = ('\n' + 26 * ' ').join(info_dict[key])
KeyError: 'pkgs_dirs'
>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\exceptions.py", line 1129, in __call__
return func(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\main.py", line 111, in main_sourced
print(activator.execute(), end="")
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\activate.py", line 167, in execute
return getattr(self, self.command)()
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\activate.py", line 141, in activate
builder_result = self.build_activate(self.env_name_or_prefix)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\activate.py", line 288, in build_activate
return self._build_activate_stack(env_name_or_prefix, False)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\activate.py", line 303, in _build_activate_stack
prefix = locate_prefix_by_name(env_name_or_prefix)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\base\context.py", line 1730, in locate_prefix_by_name
envs_dirs = context.envs_dirs
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\base\context.py", line 542, in envs_dirs
return mockable_context_envs_dirs(self.root_writable, self.root_prefix, self._envs_dirs)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\base\context.py", line 114, in mockable_context_envs_dirs
fixed_dirs += join(user_data_dir(APP_NAME, APP_NAME), 'envs'),
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\_vendor\appdirs.py", line 67, in user_data_dir
path = os.path.join(_get_win_folder(const), appauthor, appname)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\_vendor\appdirs.py", line 265, in _get_win_folder_with_pywin32
from win32com.shell import shellcon, shell
ImportError: DLL load failed while importing shell: The specified procedure could not be found.
$ C:\ProgramData\Anaconda3\Scripts\conda-script.py shell.posix activate PythonAdv
environment variables:
conda info could not be constructed.
KeyError('pkgs_dirs')
An unexpected error has occurred. Conda has prepared the above report.
My .condarc looks like this:
ssl_verify: true
channels:
conda-forge
defaults
default_python:
pkgs_dirs:
'C:\Users\anand\conda\pkgs'
'%userprofile%.conda/pkgs'
Request help resolve this issue.
I am trying to create a new environment in miniconda using the following
(base) C:\Users\User>conda create -n myenv python=3.10
But am getting the following error report:
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "C:\Users\User\miniconda3\lib\site-packages\conda\exceptions.py", line 1082, in __call__
return func(*args, **kwargs)
File "C:\Users\User\miniconda3\lib\site-packages\conda\cli\main.py", line 87, in _main
exit_code = do_call(args, p)
File "C:\Users\User\miniconda3\lib\site-packages\conda\cli\conda_argparse.py", line 84, in do_call
return getattr(module, func_name)(args, parser)
File "C:\Users\User\miniconda3\lib\site-packages\conda\cli\main_create.py", line 21, in execute
if is_conda_environment(context.target_prefix):
File "C:\Users\User\miniconda3\lib\site-packages\conda\base\context.py", line 591, in target_prefix
return determine_target_prefix(self)
File "C:\Users\User\miniconda3\lib\site-packages\conda\base\context.py", line 1738, in determine_target_prefix
return locate_prefix_by_name(prefix_name)
File "C:\Users\User\miniconda3\lib\site-packages\conda\base\context.py", line 1681, in locate_prefix_by_name
envs_dirs = context.envs_dirs
File "C:\Users\User\miniconda3\lib\site-packages\conda\base\context.py", line 517, in envs_dirs
return mockable_context_envs_dirs(self.root_writable, self.root_prefix, self._envs_dirs)
File "C:\Users\User\miniconda3\lib\site-packages\conda\base\context.py", line 91, in mockable_context_envs_dirs
fixed_dirs += join(user_data_dir(APP_NAME, APP_NAME), 'envs'),
File "C:\Users\User\miniconda3\lib\site-packages\conda\_vendor\appdirs.py", line 67, in user_data_dir
path = os.path.join(_get_win_folder(const), appauthor, appname)
File "C:\Users\User\miniconda3\lib\site-packages\conda\_vendor\appdirs.py", line 284, in _get_win_folder_with_pywin32
from win32com.shell import shellcon, shell
ImportError: DLL load failed while importing shell: The specified procedure could not be found.
`$ C:\Users\User\miniconda3\Scripts\conda-script.py create -n myenv python=3.10`
environment variables:
conda info could not be constructed.
KeyError('pkgs_dirs')
I have recently installed miniconda but thought I would see if there is any updates that are causing the issues so I ran
(base) C:\Users\User>conda update conda
And got a similar error:
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "C:\Users\User\miniconda3\lib\site-packages\conda\exceptions.py", line 1082, in __call__
return func(*args, **kwargs)
File "C:\Users\User\miniconda3\lib\site-packages\conda\cli\main.py", line 87, in _main
exit_code = do_call(args, p)
File "C:\Users\User\miniconda3\lib\site-packages\conda\cli\conda_argparse.py", line 84, in do_call
return getattr(module, func_name)(args, parser)
File "C:\Users\User\miniconda3\lib\site-packages\conda\cli\main_update.py", line 20, in execute
install(args, parser, 'update')
File "C:\Users\User\miniconda3\lib\site-packages\conda\cli\install.py", line 260, in install
unlink_link_transaction = solver.solve_for_transaction(
File "C:\Users\User\miniconda3\lib\site-packages\conda\core\solve.py", line 152, in solve_for_transaction
unlink_precs, link_precs = self.solve_for_diff(update_modifier, deps_modifier,
File "C:\Users\User\miniconda3\lib\site-packages\conda\core\solve.py", line 195, in solve_for_diff
final_precs = self.solve_final_state(update_modifier, deps_modifier, prune, ignore_pinned,
File "C:\Users\User\miniconda3\lib\site-packages\conda\core\solve.py", line 300, in solve_final_state
ssc = self._collect_all_metadata(ssc)
File "C:\Users\User\miniconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
return f(*args, **kwds)
File "C:\Users\User\miniconda3\lib\site-packages\conda\core\solve.py", line 463, in _collect_all_metadata
index, r = self._prepare(prepared_specs)
File "C:\Users\User\miniconda3\lib\site-packages\conda\core\solve.py", line 1058, in _prepare
reduced_index = get_reduced_index(self.prefix, self.channels,
File "C:\Users\User\miniconda3\lib\site-packages\conda\core\index.py", line 288, in get_reduced_index
new_records = SubdirData.query_all(spec, channels=channels, subdirs=subdirs,
File "C:\Users\User\miniconda3\lib\site-packages\conda\core\subdir_data.py", line 118, in query_all
create_cache_dir()
File "C:\Users\User\miniconda3\lib\site-packages\conda\core\subdir_data.py", line 876, in create_cache_dir
cache_dir = join(PackageCacheData.first_writable().pkgs_dir, 'cache')
File "C:\Users\User\miniconda3\lib\site-packages\conda\core\package_cache_data.py", line 151, in first_writable
pkgs_dirs = context.pkgs_dirs
File "C:\Users\User\miniconda3\lib\site-packages\conda\base\context.py", line 530, in pkgs_dirs
fixed_dirs += user_data_dir(APP_NAME, APP_NAME),
File "C:\Users\User\miniconda3\lib\site-packages\conda\_vendor\appdirs.py", line 67, in user_data_dir
path = os.path.join(_get_win_folder(const), appauthor, appname)
File "C:\Users\User\miniconda3\lib\site-packages\conda\_vendor\appdirs.py", line 284, in _get_win_folder_with_pywin32
from win32com.shell import shellcon, shell
ImportError: DLL load failed while importing shell: The specified procedure could not be found.
`$ C:\Users\User\miniconda3\Scripts\conda-script.py update conda`
environment variables:
conda info could not be constructed.
KeyError('pkgs_dirs')
I am an R user so not familiar with Python but to me, this suggests that there is something wrong with my install.
The answer comes from here as suggested by #w08r
Posting here in case anyone else finds this post first. Install an older version on win32.com:
pip install pywin32==300
For some reason
pip install pywin32==301
doesn't work for me, similar to mentioned in the comments in linked answer.
I am attempting to run through the README of the acoustic-bird-detection, but am getting this issue in the second line of code. I am new to Python so am not sure if this is a local issue or an issue with the resources themselves.
There seem to be a lot of issues which is making me suspect it is a local issue with my directory
(base) C:\Users\User>conda create -n birdsounds python=3.7
WARNING conda.exceptions:print_unexpected_error_report(1216): KeyError('pkgs_dirs')
Traceback (most recent call last):
File "C:\Users\User\miniconda3\lib\site-packages\conda\exceptions.py", line 1082, in __call__
return func(*args, **kwargs)
File "C:\Users\User\miniconda3\lib\site-packages\conda\cli\main.py", line 87, in _main
exit_code = do_call(args, p)
File "C:\Users\User\miniconda3\lib\site-packages\conda\cli\conda_argparse.py", line 84, in do_call
return getattr(module, func_name)(args, parser)
File "C:\Users\User\miniconda3\lib\site-packages\conda\cli\main_create.py", line 21, in execute
if is_conda_environment(context.target_prefix):
File "C:\Users\User\miniconda3\lib\site-packages\conda\base\context.py", line 591, in target_prefix
return determine_target_prefix(self)
File "C:\Users\User\miniconda3\lib\site-packages\conda\base\context.py", line 1738, in determine_target_prefix
return locate_prefix_by_name(prefix_name)
File "C:\Users\User\miniconda3\lib\site-packages\conda\base\context.py", line 1681, in locate_prefix_by_name
envs_dirs = context.envs_dirs
File "C:\Users\User\miniconda3\lib\site-packages\conda\base\context.py", line 517, in envs_dirs
return mockable_context_envs_dirs(self.root_writable, self.root_prefix, self._envs_dirs)
File "C:\Users\User\miniconda3\lib\site-packages\conda\base\context.py", line 91, in mockable_context_envs_dirs
fixed_dirs += join(user_data_dir(APP_NAME, APP_NAME), 'envs'),
File "C:\Users\User\miniconda3\lib\site-packages\conda\_vendor\appdirs.py", line 67, in user_data_dir
path = os.path.join(_get_win_folder(const), appauthor, appname)
File "C:\Users\User\miniconda3\lib\site-packages\conda\_vendor\appdirs.py", line 284, in _get_win_folder_with_pywin32
from win32com.shell import shellcon, shell
ImportError: DLL load failed while importing shell: The specified procedure could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\User\miniconda3\lib\site-packages\conda\exceptions.py", line 1214, in print_unexpected_error_report
message_builder.append(get_main_info_str(error_report['conda_info']))
File "C:\Users\User\miniconda3\lib\site-packages\conda\cli\main_info.py", line 237, in get_main_info_str
info_dict['_' + key] = ('\n' + 26 * ' ').join(info_dict[key])
KeyError: 'pkgs_dirs'
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "C:\Users\User\miniconda3\lib\site-packages\conda\exceptions.py", line 1082, in __call__
return func(*args, **kwargs)
File "C:\Users\User\miniconda3\lib\site-packages\conda\cli\main.py", line 87, in _main
exit_code = do_call(args, p)
File "C:\Users\User\miniconda3\lib\site-packages\conda\cli\conda_argparse.py", line 84, in do_call
return getattr(module, func_name)(args, parser)
File "C:\Users\User\miniconda3\lib\site-packages\conda\cli\main_create.py", line 21, in execute
if is_conda_environment(context.target_prefix):
File "C:\Users\User\miniconda3\lib\site-packages\conda\base\context.py", line 591, in target_prefix
return determine_target_prefix(self)
File "C:\Users\User\miniconda3\lib\site-packages\conda\base\context.py", line 1738, in determine_target_prefix
return locate_prefix_by_name(prefix_name)
File "C:\Users\User\miniconda3\lib\site-packages\conda\base\context.py", line 1681, in locate_prefix_by_name
envs_dirs = context.envs_dirs
File "C:\Users\User\miniconda3\lib\site-packages\conda\base\context.py", line 517, in envs_dirs
return mockable_context_envs_dirs(self.root_writable, self.root_prefix, self._envs_dirs)
File "C:\Users\User\miniconda3\lib\site-packages\conda\base\context.py", line 91, in mockable_context_envs_dirs
fixed_dirs += join(user_data_dir(APP_NAME, APP_NAME), 'envs'),
File "C:\Users\User\miniconda3\lib\site-packages\conda\_vendor\appdirs.py", line 67, in user_data_dir
path = os.path.join(_get_win_folder(const), appauthor, appname)
File "C:\Users\User\miniconda3\lib\site-packages\conda\_vendor\appdirs.py", line 284, in _get_win_folder_with_pywin32
from win32com.shell import shellcon, shell
ImportError: DLL load failed while importing shell: The specified procedure could not be found.
`$ C:\Users\User\miniconda3\Scripts\conda-script.py create -n birdsounds python=3.7`
environment variables:
conda info could not be constructed.
KeyError('pkgs_dirs')
I am using Windows 10.
I tried installing google-colab and now jupyter notebook won't work, neither will anaconda navigator. Only way I can open jupyter notebook is via cmd but then the kernal error I get means I can't run anything
Here is the error message:
Traceback (most recent call last):
File "c:\anaconda\lib\site-packages\tornado\web.py", line 1512, in _execute
result = yield result
File "c:\anaconda\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "c:\anaconda\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "c:\anaconda\lib\site-packages\tornado\gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "c:\anaconda\lib\site-packages\notebook\services\sessions\handlers.py", line 70, in post
model = yield gen.maybe_future(
File "c:\anaconda\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "c:\anaconda\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "c:\anaconda\lib\site-packages\tornado\gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "c:\anaconda\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:\anaconda\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "c:\anaconda\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "c:\anaconda\lib\site-packages\tornado\gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "c:\anaconda\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 91, in start_kernel_for_session
kernel_id = yield gen.maybe_future(
File "c:\anaconda\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "c:\anaconda\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "c:\anaconda\lib\site-packages\tornado\gen.py", line 307, in wrapper
yielded = next(result)
File "c:\anaconda\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 141, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "c:\anaconda\lib\site-packages\jupyter_client\multikernelmanager.py", line 185, in start_kernel
km.start_kernel(**kwargs)
File "c:\anaconda\lib\site-packages\jupyter_client\manager.py", line 309, in start_kernel
kernel_cmd, kw = self.pre_start_kernel(**kw)
File "c:\anaconda\lib\site-packages\jupyter_client\manager.py", line 256, in pre_start_kernel
self.write_connection_file()
File "c:\anaconda\lib\site-packages\jupyter_client\connect.py", line 468, in write_connection_file
self.connection_file, cfg = write_connection_file(self.connection_file,
File "c:\anaconda\lib\site-packages\jupyter_client\connect.py", line 138, in write_connection_file
with secure_write(fname) as f:
File "c:\anaconda\lib\contextlib.py", line 113, in __enter__
return next(self.gen)
File "c:\anaconda\lib\site-packages\jupyter_core\paths.py", line 461, in secure_write
win32_restrict_file_to_user(fname)
File "c:\anaconda\lib\site-packages\jupyter_core\paths.py", line 387, in win32_restrict_file_to_user
import win32api
ImportError: DLL load failed while importing win32api: The specified procedure could not be found.
Please help me
Run Scripts\pywin32_postinstall.py -install in an Admin command prompt
ref: https://github.com/mhammond/pywin32/issues/1431
I just installed miniconda,jupyter notebook, python, and some packages.
I have the appropriate version of pywin32.
Traceback (most recent call last):
File "c:\users\kivix\miniconda3\envs\thematrix\lib\site-packages\tornado\web.py", line 1703, in _execute
result = await result
File "c:\users\kivix\miniconda3\envs\thematrix\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "c:\users\kivix\miniconda3\envs\thematrix\lib\site-packages\notebook\services\sessions\handlers.py", line 69, in post
model = yield maybe_future(
File "c:\users\kivix\miniconda3\envs\thematrix\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "c:\users\kivix\miniconda3\envs\thematrix\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "c:\users\kivix\miniconda3\envs\thematrix\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\kivix\miniconda3\envs\thematrix\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "c:\users\kivix\miniconda3\envs\thematrix\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "c:\users\kivix\miniconda3\envs\thematrix\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 100, in start_kernel_for_session
kernel_id = yield maybe_future(
File "c:\users\kivix\miniconda3\envs\thematrix\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "c:\users\kivix\miniconda3\envs\thematrix\lib\site-packages\tornado\gen.py", line 209, in wrapper
yielded = next(result)
File "c:\users\kivix\miniconda3\envs\thematrix\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "c:\users\kivix\miniconda3\envs\thematrix\lib\site-packages\jupyter_client\multikernelmanager.py", line 158, in start_kernel
km.start_kernel(**kwargs)
File "c:\users\kivix\miniconda3\envs\thematrix\lib\site-packages\jupyter_client\manager.py", line 301, in start_kernel
kernel_cmd, kw = self.pre_start_kernel(**kw)
File "c:\users\kivix\miniconda3\envs\thematrix\lib\site-packages\jupyter_client\manager.py", line 248, in pre_start_kernel
self.write_connection_file()
File "c:\users\kivix\miniconda3\envs\thematrix\lib\site-packages\jupyter_client\connect.py", line 468, in write_connection_file
self.connection_file, cfg = write_connection_file(self.connection_file,
File "c:\users\kivix\miniconda3\envs\thematrix\lib\site-packages\jupyter_client\connect.py", line 138, in write_connection_file
with secure_write(fname) as f:
File "c:\users\kivix\miniconda3\envs\thematrix\lib\contextlib.py", line 113, in enter
return next(self.gen)
File "c:\users\kivix\miniconda3\envs\thematrix\lib\site-packages\jupyter_core\paths.py", line 435, in secure_write
win32_restrict_file_to_user(fname)
File "c:\users\kivix\miniconda3\envs\thematrix\lib\site-packages\jupyter_core\paths.py", line 361, in win32_restrict_file_to_user
import win32api
ImportError: DLL load failed while importing win32api: The specified module could not be found.
I got a similar issue yesterday. Try running this code in the CMD
conda install pywin32
and install it if you use Anaconda.