2

After reinstalling Anaconda, I get the error message "Exit code: 1" when I start apps using the Anaconda Navigator. e.g. "jupyter notebook" or "CMD.exe"

Exit code: 1

When I use the CMD (base) via Env. or start from the windows start bar, it works. Jupyter also runs when I start it directly from the start bar.

This works

I only get the error message in the Anaconda navigator. I uninstalled Visual Studio. Still does not work.

Mr J
  • 57
  • 1
  • 1
  • 6
  • Facing similar issue inPython 3.9 • 64-Bit Graphical Installer , tried uninstall/ removed all the temporary files. still facing the similar issue – RP. Nov 27 '21 at 13:55
  • 1
    I also installed it several times. I also tried to delete all temporary files. I think it's a problem in the anaconda navigator. The anaconda version of j-notebook and CMD basically work. (e.g. start bar) – Mr J Nov 27 '21 at 14:29
  • Did you find anything? @RP. – Vaibhav Kadam Jan 02 '22 at 22:24

10 Answers10

4

Spent a few hours on this :

You need to run this in command prompt --> conda install ipykernel --update-deps --force-reinstall

There are 2 Errors popped for me for you it may be something else:

  1. Wrong System-path[in my case --> C:/Windows/System32 and C:/Windows/System] PATH in Env. variables
  2. If you get chcp error in command prompt then add [ Value : chcp 1252 Name : Autorun ] for Computer\HKEY_CURRENT_USER\Software\Microsoft\Command Processor in regedit.
Vaibhav Kadam
  • 699
  • 1
  • 5
  • 21
  • Not to be pedantic but the user needs to run as adminstrator for this to work properly but it in my opinion is the best/easiest solution, so +1 – alittleloopy Apr 24 '23 at 00:28
4

Go to Environment Variables under System variables.

Under PATH , click Edit and add NEW:

C:\Windows\System32

Save and exit.

All Credit to : Original solution posted under @BAIZ1D https://github.com/ContinuumIO/anaconda-issues/issues/12735

2

This issue arises in Windows when you reinstall the Anaconda, Miniconda, or even Miniforge. Because some registry keys remain after the first installation, you need to wipe them from Windows Registry after uninstallation and then reinstall the Anaconda.

The suspected key in your situation is the AutoRun that is added to the "HKCU\Software\Microsoft\Command Processor"; thus, just remove the key from the registry after uninstallation, and then reinstall:

C:\Windows\System32\reg.exe DELETE "HKCU\Software\Microsoft\Command Processor" /v AutoRun /f
  • If you can't get around the command line, use the registry editor as mentioned in the link below https://github.com/ContinuumIO/anaconda-issues/issues/12735. 1. Registry editor (regedit) on start menu and go to Computer\HKEY_CURRENT_USER\Software\Microsoft\Command Processor 2. delete autorun | this fixed both cmd.exe and anaconda navigator launching – sule mohammed Aug 12 '23 at 12:06
0

After lot of fiddling around, I found out a solution for the issue in local machine. Somehow system path variables were deleted. I added following entries for system path variables and reinstalled anaconda and everything works fine! C:\Windows\System32;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;

Refer : 'chcp' is not recognized as an internal or external command, operable program or batch file. on a Windows PC

RP.
  • 717
  • 2
  • 13
  • 29
0

I was getting the same error.

I added below under Environment Variables ,

C:/Windows/System32 C:/Python310 (Python installed here in my case)

Also I checked the Registry and I don't find any Autorun which is recommended to delete.

It didn't worked for me after adding the above. Then I restarted the machine it worked without any issues.

Divyanshu mehta
  • 319
  • 4
  • 8
0

Add C:/Windows/System32 and C:/Windows/System as PATH in Environment variables and delete other entries of Anaconda applications (I had pycharm deleted) from env. variables. It worked for me.

Hanzel
  • 1
0

I was facing with the same problem too..

I tried to uninstall and reinstall the Anaconda but it was a waste of time. I just did these steps and I solve the problem!:

Go to Environment Variables under System variables. Click to "Advanced". Under "Path", click "Edit" and add "New":

C:\Windows\System32

Save and exit.

Credit to : Original solution posted under @BAIZ1D

0

I faced the same issue after I tried to reinstall the Anaconda Navigator. Many suggested deleting the Autorun file or editing the value but I did not have "autorun" files ... finally noticed that I'm missing a file under Command Processor and adding the file as well as adding the path fixed the error "Exit Code: 1". Having said that: This solution is specifically for those who CAN NOT find THE "Command Processor" Or can not delete the autorun and/or don't have an autorun.

1- Go to the registry editor
(run>regedit)

Computer\HKEY_CURRENT_USER\Software\Microsoft\Command Processor

looks for "PathCompletionChar" and put the same value as "CompletionChar" REG_DOWRD. If you missing the file then Create a new REG_DWORD and name it "PathCompletionChar" and put the same value as "CompletionChar". In my case, it was 40.

enter image description here

2- Adding C:\Windows\System32 as PATH to the Environment Variables.

enter image description here

Control panel > system > Advanced System settings > Environment Variables >New > add PATH as name and C:\Windows\System32 as value save and close it. Make sure to restart the computer. I hope that help.

Store shah
  • 43
  • 1
  • 9
0

Updating to the latest powershell solved the problem for me. I uninstalled Anaconda, then installed the latest powershell from the microsoft store, then reinstalled anaconda. Reference: enter link description here

Roland
  • 103
  • 1
  • 1
  • 7
0

"Exit Code: 1" in Anaconda Navigator apps launch & command prompts

I had the same error in Anaconda Navigator and cmd.exe command prompt would also crash with the same Exit Code: 1. The solution to the command prompt error also fixed my Anaconda app launch problem. No reinstall required.

Enter the following command in PowerShell:

C:\Windows\System32\reg.exe DELETE "HKCU\Software\Microsoft\Command Processor" /v AutoRun /f

Original answer for command prompt error by @crisprog.