使用anaconda时报错,之前曾经使用联想电脑管家更新过一次(纯属误操作),导致anaconda和pycharm都更新,当时更新结束后重新配置环境都成功,一周以后出现此情况:
(base) C:\Users\82776>activate python363
WARNING conda.exceptions:print_unexpected_error_report(1246): KeyError('pkgs_dirs')
Traceback (most recent call last):
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\exceptions.py", line 1114, in __call__
return func(*args, **kwargs)
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\cli\main.py", line 110, in main_sourced
print(activator.execute(), end="")
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\activate.py", line 172, in execute
return getattr(self, self.command)()
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\activate.py", line 146, in activate
builder_result = self.build_activate(self.env_name_or_prefix)
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\activate.py", line 294, in build_activate
return self._build_activate_stack(env_name_or_prefix, False)
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\activate.py", line 308, in _build_activate_stack
prefix = locate_prefix_by_name(env_name_or_prefix)
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\base\context.py", line 1712, in locate_prefix_by_name
envs_dirs = context.envs_dirs
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\base\context.py", line 533, in envs_dirs
return mockable_context_envs_dirs(self.root_writable, self.root_prefix, self._envs_dirs)
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\base\context.py", line 107, in mockable_context_envs_dirs
fixed_dirs += join(user_data_dir(APP_NAME, APP_NAME), 'envs'),
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\_vendor\appdirs.py", line 67, in user_data_dir
path = os.path.join(_get_win_folder(const), appauthor, appname)
File "E:\StudyTools\Anaconda\conda\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: 找不到指定的程序。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\exceptions.py", line 1244, in print_unexpected_error_report
message_builder.append(get_main_info_str(error_report['conda_info']))
File "E:\StudyTools\Anaconda\conda\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 "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\exceptions.py", line 1114, in __call__
return func(*args, **kwargs)
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\cli\main.py", line 110, in main_sourced
print(activator.execute(), end="")
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\activate.py", line 172, in execute
return getattr(self, self.command)()
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\activate.py", line 146, in activate
builder_result = self.build_activate(self.env_name_or_prefix)
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\activate.py", line 294, in build_activate
return self._build_activate_stack(env_name_or_prefix, False)
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\activate.py", line 308, in _build_activate_stack
prefix = locate_prefix_by_name(env_name_or_prefix)
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\base\context.py", line 1712, in locate_prefix_by_name
envs_dirs = context.envs_dirs
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\base\context.py", line 533, in envs_dirs
return mockable_context_envs_dirs(self.root_writable, self.root_prefix, self._envs_dirs)
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\base\context.py", line 107, in mockable_context_envs_dirs
fixed_dirs += join(user_data_dir(APP_NAME, APP_NAME), 'envs'),
File "E:\StudyTools\Anaconda\conda\lib\site-packages\conda\_vendor\appdirs.py", line 67, in user_data_dir
path = os.path.join(_get_win_folder(const), appauthor, appname)
File "E:\StudyTools\Anaconda\conda\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: 找不到指定的程序。
`$ E:\StudyTools\Anaconda\conda\Scripts\conda-script.py shell.cmd.exe activate python363`
environment variables:
conda info could not be constructed.
KeyError('pkgs_dirs')
An unexpected error has occurred. Conda has prepared the above report.
If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers?