question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Activating Python 3.7.3 64-bit ('base': conda) to run Jupyter failed with Error: Command failed

See original GitHub issue

Another person has reported a similar problem on Unix. To make sure that my setup is not corrupted, I have uninstalled Conda, Anaconda, VSCode, and all related files, directories, and registry keys, and reinstalled it. I have reinstalled the latest versions as of now. I did not have this issue before at all. It has appeared after the latest VSCode update. I have not made any changes to any configs and accepted all defaults while installing Anaconda. I installed VSCode via Anaconda. I am using Windows 10.

I am teaching a Python class using VSCode and all my students are having the same problem.

Activating Python 3.7.3 64-bit ('base': conda) to run Jupyter failed with Error: Command failed: C:/Users/dgode/Miniconda3/Scripts/activate && conda activate base && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python C:/Users/dgode/.vscode/extensions/ms-python.python-2019.3.6352/pythonFiles/printEnvVariables.py

ERROR REPORT

Traceback (most recent call last):
  File "C:\Users\dgode\Miniconda3\lib\site-packages\conda\cli\main.py", line 138, in main
    return activator_main()
  File "C:\Users\dgode\Miniconda3\lib\site-packages\conda\activate.py", line 940, in main
    print(activator.execute(), end='')
  File "C:\Users\dgode\Miniconda3\lib\site-packages\conda\activate.py", line 173, in execute
    return getattr(self, self.command)()
  File "C:\Users\dgode\Miniconda3\lib\site-packages\conda\activate.py", line 150, in activate
    builder_result = self.build_activate(self.env_name_or_prefix)
  File "C:\Users\dgode\Miniconda3\lib\site-packages\conda\activate.py", line 275, in build_activate
    return self._build_activate_stack(env_name_or_prefix, False)
  File "C:\Users\dgode\Miniconda3\lib\site-packages\conda\activate.py", line 297, in _build_activate_stack
    return self.build_reactivate()
  File "C:\Users\dgode\Miniconda3\lib\site-packages\conda\activate.py", line 442, in build_reactivate
    new_path = self.pathsep_join(self._replace_prefix_in_path(conda_prefix, conda_prefix))
  File "C:\Users\dgode\Miniconda3\lib\site-packages\conda\activate.py", line 550, in _replace_prefix_in_path
    assert last_idx is not None
AssertionError

$ C:\Users\dgode\Miniconda3\Scripts\conda-script.py shell.cmd.exe activate

environment variables:
CIO_TEST=
CONDA_DEFAULT_ENV=base
CONDA_EXE=C:\Users\dgode\Miniconda3\condabin..\Scripts\conda.exe
CONDA_PREFIX=C:\Users\dgode\Miniconda3
CONDA_PROMPT_MODIFIER=(base)
CONDA_ROOT=C:\Users\dgode\Miniconda3
CONDA_SHLVL=1
HOMEPATH=\Users\dgode
PATH=C:\Users\dgode\Miniconda3;C:\Users\dgode\Miniconda3\Library\mingw-w64
bin;C:\Users\dgode\Miniconda3\Library\usr\bin;C:\Users\dgode\Miniconda
3\Library\bin;C:\Users\dgode\Miniconda3\Scripts;C:\Users\dgode\Minicon
da3\bin;C:\Users\dgode\Miniconda3\condabin;C:\Users\dgode\Miniconda3;C
:\Users\dgode\Miniconda3\Library\mingw-w64\bin;C:\Users\dgode\Minicond
a3\Library\usr\bin;C:\Users\dgode\Miniconda3\Library\bin;C:\Users\dgod
e\Miniconda3\Scripts;C:\Program Files (x86)\Intel\iCLS
Client;C:\Program Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WIN
DOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1
.0;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-
Static;C:\Program Files (x86)\Intel\Intel(R) Management Engine
Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine
Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine
Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine
Components\IPT;C:\WINDOWS\System32\OpenSSH;C:\Program
Files\PuTTY;C:\Users\dgode\AppData\Local\Microsoft\WindowsApps
PSMODULEPATH=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\Windows
PowerShell\v1.0\Modules;C:\Program Files\Intel
PYTHONIOENCODING=utf-8
PYTHONUNBUFFERED=1
REQUESTS_CA_BUNDLE=
SSL_CERT_FILE=

 active environment : base
active env location : C:\Users\dgode\Miniconda3
        shell level : 1
   user config file : C:\Users\dgode\.condarc

populated config files : C:\Users\dgode.condarc
conda version : 4.6.11
conda-build version : not installed
python version : 3.7.3.final.0
base environment : C:\Users\dgode\Miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/win-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\Users\dgode\Miniconda3\pkgs
C:\Users\dgode.conda\pkgs
C:\Users\dgode\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\dgode\Miniconda3\envs
C:\Users\dgode.conda\envs
C:\Users\dgode\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.6.11 requests/2.21.0 CPython/3.7.3 Windows/10 Windows/10.0.17763
administrator : False
netrc file : None
offline mode : False

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?

.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:20 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
DonJayamannecommented, Apr 17, 2019

@dangode I’m sorry about these issues. Over the next few days (hopefully tomorrow), I’ll be spending time to look into the issues related to Conda + VS Code. Hopefully I can get to the bottom of this.

Once again, I’m sorry about these issues & understand for not wanting to install anything with the fear of breaking things.

0reactions
DonJayamannecommented, May 16, 2019

Now both the command window and the interactive window are working. However, I am afraid to install anything else because it might break the install again.

closing as the issue has been resolved and we’re tracking conda related issues here #5344

Read more comments on GitHub >

github_iconTop Results From Across the Web

vscode can't open Python interactive, and the following error ...
Activating Python 3.7.3 64-bit to run Jupyter failed with Error: Command failed: D:\software\anaconda\activate base && echo ...
Read more >
Announcing Support for Native Editing of Jupyter Notebooks ...
Trying to run a Jupyter notebook on Visual studio Code is throwing this error – “Activating Python 3.7.3 64-bit ('base': conda) to run...
Read more >
running cells with 'python 3.10.4 64-bit' requires ipykernel ...
I don't think ipykernel is compatible with 3.10. Below is the message I receive when I try to install ipykernel with the following...
Read more >
Python – VS Code Python Interactive Window Cannot find Conda ...
Executing code failed : Error: Activating Python 3.7.3 64-bit ('base': conda) to run Jupyter failed with Error: Command failed: "H:/My ...
Read more >
Release notes — conda 22.11.1.post16+ce4e810c9 ...
Stop referring to updating anaconda when conda update fails with an error. ... Fix logic error when running under Python 2.7 on 64-bit...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found