Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dangode opened this issue Apr 7, 2019 · 20 comments
Assignees

Comments

@dangode
Copy link

dangode commented Apr 7, 2019

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?

.

@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Apr 7, 2019
@dangode
Copy link
Author

dangode commented Apr 7, 2019

I have also created a new environment to test it. The error persists in the new environment.

@DonJayamanne
Copy link

#4708 (comment)

Please try the above.

@ericsnowcurrently /cc

@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Apr 8, 2019
@dangode
Copy link
Author

dangode commented Apr 8, 2019 via email

@ericsnowcurrently
Copy link
Member

Were you able to try using the setting that Don referenced?

@ericsnowcurrently ericsnowcurrently added the info-needed Issue requires more information from poster label Apr 8, 2019
@ericsnowcurrently
Copy link
Member

If that doesn't help then you'll want to open a bug report against Anaconda.

@dangode
Copy link
Author

dangode commented Apr 8, 2019 via email

@ericsnowcurrently
Copy link
Member

Then the setting would look like this:

"terminal.integrated.env.windows": {
		"PATH": ""
}

@dangode
Copy link
Author

dangode commented Apr 9, 2019 via email

@dangode
Copy link
Author

dangode commented Apr 10, 2019 via email

@dangode
Copy link
Author

dangode commented Apr 10, 2019 via email

@ericsnowcurrently
Copy link
Member

Thanks for sticking with it, @dangode. I'm sorry everyone's been giving you the runaround (me included). Let's stop that cycle here and get to the bottom of the problem. The workarounds you have found should definitely not be necessary. It's a bug (or two) somewhere, so let's figure out where.

Let me make sure I understand the situation:

  • you have VSCode (along with the Python extension) installed via Anaconda
  • you can launch it via Anaconda Navigator, as well as directly (in the start menu)
  • when launched through Anaconda Navigator:
    • sending a script to the terminal (in VSCode) works
    • opening a Python REPL (via VSCode) does not work
    • Jupyter server does not start
  • when launched directly from the start menu:
    • sending a script to the terminal (in VSCode) does not work
    • opening a Python REPL (via VSCode) works
    • Jupyter server does starts

Is that right?

Here are some other questions I have:

  1. did you also install VSCode (and the Python extension) directly? did that have the same problems?
  2. what specific steps does "Running a Python Program by sending it to Terminal" represent?
  3. in the start menu case, how does "Running a Python Program by sending it to Terminal" fail, specifically?
  4. what specific steps does "Launching the Interactive Window" represent?
  5. what are you doing to launch the Jupyter server?

Again, sorry for all the indirection. Let's solve this.

@ericsnowcurrently ericsnowcurrently added the info-needed Issue requires more information from poster label Apr 10, 2019
@dangode
Copy link
Author

dangode commented Apr 11, 2019 via email

@ericsnowcurrently ericsnowcurrently removed the info-needed Issue requires more information from poster label Apr 11, 2019
@ericsnowcurrently
Copy link
Member

I haven't read through your response yet, but wanted to clarify something in the meantime.

Just to be clear, I did not have any problems until last week. Some update
has messed things up. I don’t know which one.

Here are the things I'm aware of for which an update may have caused the problem:

  • OS
  • Anaconda
  • VSCode
  • Python extension for VSCode

Are you aware of updates to any of those around the time the problems started? What happens if you use the previous version of the Python extension?

@ericsnowcurrently
Copy link
Member

This likely falls under #4568.

@dangode
Copy link
Author

dangode commented Apr 11, 2019 via email

@dangode
Copy link
Author

dangode commented Apr 12, 2019

Update: After the updates this morning, the Terminal does not work regardless of whether I launch VSCode via Anaconda or directly. Jupyter interactive window works only when VSCode is launched directly but not when it is launched via Anaconda. Since input statements do not work via the Jupyter interactive window in VSCode (known bug), VSCode is not really usable in my class. For what it is worth, these problems arise only on Windows. I am going to have to look for other alternatives to VSCode because my students and I cannot get the Python Terminal to work at all.

@ericsnowcurrently
Copy link
Member

@dangode, sorry it's taking so long to get to the bottom of this. @DonJayamanne is going to be taking a look at the underlying problem in the next few days (e.g. #4402). We'll keep you posted.

@dangode
Copy link
Author

dangode commented Apr 17, 2019 via email

@DonJayamanne
Copy link

@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.

@DonJayamanne DonJayamanne mentioned this issue Apr 17, 2019
24 tasks
@DonJayamanne
Copy link

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

@ghost ghost removed the triage label May 16, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants