在 Pop!_OS 上安装了 Anaconda,但它没有运行

在 Pop!_OS 上安装了 Anaconda,但它没有运行

我已经正确安装了 Conda,并且它可以正常工作。

我做到了

     singh@zeppelin:~$ source~/anaconda3/bin/activate root
     (base) singh@zeppelin:~$ anaconda-navigator

我收到 Anaconda Ring 提示该程序正在初始化,然后我在终端中收到此消息。 :

   Traceback (most recent call last):
    File "/home/singh/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/main_window.py", 
   line 541, in setup
   self.post_setup(conda_data=conda_data)
   File "/home/singh/anaconda3/lib/python3.7/site- packages/anaconda_navigator/widgets/main_window.py", 
   
   line 578, in post_setup
   self.tab_home.setup(conda_data)

   File "/home/singh/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/tabs/home.py", line 169, in setup
self.set_applications(applications, packages)

  File "/home/singh/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/tabs/home.py", 
 line 204, in set_applications
 apps = self.api.process_apps(applications, 
 prefix=self.current_prefix)
 
 File "/home/singh/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/anaconda_api.py", line 848, in process_apps
app = app(config=self.config, 
process_api=self._process_api, conda_api=self._conda_api)


 File "/home/singh/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/external_apps/vscode.py", line 48, in __init__
**kwargs


File "/home/singh/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/external_apps/base.py", line 43, in __init__
self.init()


File "/home/singh/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/external_apps/base.py", line 60, in init
SUBDIR, INST_EXT, INST_DIR = self._find_linux_install_dir()


File "/home/singh/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/external_apps/vscode.py", line 168, in _find_linux_install_dir

if DISTRO_NAME in ['ubuntu', 'debian']:
UnboundLocalError: local variable 'DISTRO_NAME' referenced before assignment

感谢您的帮助。

答案1

要解决此错误消息:

UnboundLocalError: local variable "DISTRO_NAME" referenced before assignment

conda update anaconda-navigator在终端中运行并anaconda-navigator再次运行。

如果这不起作用,请/home/singh/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/external_apps/vscode.py在文本编辑器中打开,并在该if语句之后和之前的第 168 行中for添加以下行:DISTRO_NAME='ubuntu'

如果前两个建议不起作用,请重新安装并更新 conda、anaconda navigator 和 navigator updater。

相关内容