赞
踩
注意版本:本方法适用于D:\software\Anaconda\Lib\site-packages\anaconda_navigator\api下没有conda_api.py文件的版本,如下图
def local_apps_info(self): apps_info: typing.Dict[api_types.ApplicationName, 'api_types.RawApplication'] = {} channels: typing.List[str] = self.load_rc().get('channels', []) channel_data: typing.Dict[str, typing.Dict[str, typing.Any]] = {} if channels is not None: for channel in channels: data: typing.Dict[str, typing.Any] = self.get_local_channel_data(channel) if data: channel_data[channel] = data for channel, data in channel_data.items(): package_name: api_types.ApplicationName package_data: typing.Dict[str, typing.Any] for package_name, package_data in data.get('packages', {}).items(): version: str = package_data.get('version', '') image_path: str = os.path.join(misc.convert_file_url_to_path(channel), package_data.get('icon_url', '')) app_data: 'api_types.RawApplication' = { 'name': package_name, 'description': package_data.get('summary', ''), 'versions': [version], 'image_path': image_path if os.path.exists(image_path) else None } apps_info[package_name] = app_data return apps_info
这样就可以打开了。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。