-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Comments
I have also created a new environment to test it. The error persists in the new environment. |
Please try the above. |
Hi Don,
I did a lot more testing after trying this on several computers. I think an Anaconda update is messing up the VSCode extension. All students in my class had a problem when using MS windows.
If I launch vscode from the start menu (not the Anaconda menu) then I can launch the Jupyter window without problems and run my code. but then the terminal cannot be used as none of the modules are found. If I launch the vscode via Anaconda, then the jupyter interactive window cannot be launched but the terminal works perfectly.
Thank you.
Best,
Dan Gode
Please excuse any typos or unintended autocorrections.
Sent from my iPhone
… On Apr 8, 2019, at 1:53 PM, Don Jayamanne ***@***.***> wrote:
#4708 (comment)
Please try the above.
@ericsnowcurrently /cc
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Were you able to try using the setting that Don referenced? |
If that doesn't help then you'll want to open a bug report against Anaconda. |
Hi,
I am not using a MAC. I am using Windows. Does this still apply?
Thanks.
Best,
Dan Gode
From: Eric Snow <notifications@github.com>
Sent: Monday, April 8, 2019 4:56 PM
To: Microsoft/vscode-python <vscode-python@noreply.github.com>
Cc: Dan Gode <dan.gode@almaris.com>; Author <author@noreply.github.com>
Subject: Re: [Microsoft/vscode-python] Activating Python 3.7.3 64-bit ('base': conda) to run Jupyter failed with Error: Command failed (#5145)
If that doesn't help then you'll want to open a bug report against Anaconda.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#5145 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/At8EqRXd5vnDAYoL5mw32ZhWBWI5jUh1ks5ve6z9gaJpZM4cghqi> . <https://github.com/notifications/beacon/At8EqTEPk8kOSA-mWQN5sK-pLSu6Tdsyks5ve6z9gaJpZM4cghqi.gif>
|
Then the setting would look like this: "terminal.integrated.env.windows": {
"PATH": ""
} |
Hi Eric,
I tried many variations of this. Nothing works. I can’t figure out where the problems is. Anaconda says talk to VSCode, VSCode says talk to VSCode Python Extension, and you guys think it is an Anaconda problem. I can’t figure out what to do. I teach a class in Python and Data Analytics at New York University. I chose VSCode because I like it. However, if a key functionality such as launching Jupyter sessions does not work, the software is not usable. I am not saying that it is your fault but users like me get caught in the middle.
I guess I am going to change my class software to PyCharm community edition.
Thanks for your help.
Best,
Dan Gode
From: Eric Snow <notifications@github.com>
Sent: Monday, April 8, 2019 6:12 PM
To: Microsoft/vscode-python <vscode-python@noreply.github.com>
Cc: Dan Gode <dan.gode@almaris.com>; Author <author@noreply.github.com>
Subject: Re: [Microsoft/vscode-python] Activating Python 3.7.3 64-bit ('base': conda) to run Jupyter failed with Error: Command failed (#5145)
Then the setting would look like this:
"terminal.integrated.env.windows": {
"PATH": ""
}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#5145 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/At8EqdY40KmTdTFhS-DyImSBS7EmEOrBks5ve77DgaJpZM4cghqi> . <https://github.com/notifications/beacon/At8EqQ6meSIuMGn6ef3e791mwORzoV2mks5ve77DgaJpZM4cghqi.gif>
|
I finally made it work. VSCode fails to lauch Jupyter Interactive Window when launched via Anaconda Navigator. However, when launched directly via the Windows Start Menu, both the Jupyter Interactive Window and the Command Window work.
Thanks a lot for your help. I can continue with VSCode.
From: Eric Snow <notifications@github.com>
Sent: Monday, April 8, 2019 6:12 PM
To: Microsoft/vscode-python <vscode-python@noreply.github.com>
Cc: Dan Gode <dan.gode@almaris.com>; Author <author@noreply.github.com>
Subject: Re: [Microsoft/vscode-python] Activating Python 3.7.3 64-bit ('base': conda) to run Jupyter failed with Error: Command failed (#5145)
Then the setting would look like this:
"terminal.integrated.env.windows": {
"PATH": ""
}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#5145 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/At8EqdY40KmTdTFhS-DyImSBS7EmEOrBks5ve77DgaJpZM4cghqi> . <https://github.com/notifications/beacon/At8EqQ6meSIuMGn6ef3e791mwORzoV2mks5ve77DgaJpZM4cghqi.gif>
|
Final update
Method 1: Works Partially
1. Launch Anaconda Navigator.
2. Launch VSCode via the Navigator.
3. Works: Running a Python Program by sending it to Terminal
4. Fails: Launching the Interactive Window or sending a section of the code to the interactive window. Jupyter server fails to launch.
Method 2: Works Partially
5. Launch VSCode from the Start Menu directly.
6. Works: Interactive Window works perfectly.
7. Fails: Terminal fails because it can’t find Python modules such as Numpy.
This is still cumbersome but workable. I use Method 1 when I need to run via Terminal and Method 2 when I need the interactive window.
Editing settings.json in the user directory as follows did not help:
This is what my settings.json looks like.
{
"editor.minimap.enabled": false,
"python.dataScience.sendSelectionToInteractiveWindow": true,
"python.pythonPath": "C:\\Users\\dgode\\Miniconda3",
"terminal.integrated.env.windows": {
"PATH": ""
},
"window.zoomLevel": 1
}
From: Eric Snow <notifications@github.com>
Sent: Monday, April 8, 2019 6:12 PM
To: Microsoft/vscode-python <vscode-python@noreply.github.com>
Cc: Dan Gode <dan.gode@almaris.com>; Author <author@noreply.github.com>
Subject: Re: [Microsoft/vscode-python] Activating Python 3.7.3 64-bit ('base': conda) to run Jupyter failed with Error: Command failed (#5145)
Then the setting would look like this:
"terminal.integrated.env.windows": {
"PATH": ""
}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#5145 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/At8EqdY40KmTdTFhS-DyImSBS7EmEOrBks5ve77DgaJpZM4cghqi> . <https://github.com/notifications/beacon/At8EqQ6meSIuMGn6ef3e791mwORzoV2mks5ve77DgaJpZM4cghqi.gif>
|
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:
Is that right? Here are some other questions I have:
Again, sorry for all the indirection. Let's solve this. |
Hi Eric,
Thanks for taking the time to look into this.
1. 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.
2. I have tried my best to uninstall everything (Anaconda and VSCode) completely and reinstall it. Made no difference.
3. My answers to your questions are given below.
From: Eric Snow <notifications@github.com>
Sent: Wednesday, April 10, 2019 6:33 PM
To: Microsoft/vscode-python <vscode-python@noreply.github.com>
Cc: Dan Gode <dan.gode@almaris.com>; Mention <mention@noreply.github.com>
Subject: Re: [Microsoft/vscode-python] Activating Python 3.7.3 64-bit ('base': conda) to run Jupyter failed with Error: Command failed (#5145)
Thanks for sticking with it, @dangode <https://github.com/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 Right
* you can launch it via Anaconda Navigator, as well as directly (in the start menu) Right
* when launched through Anaconda Navigator:
* sending a script to the terminal (in VSCode) works Right
* opening a Python REPL (via VSCode) does not work Right
* Jupyter server does not start Right
* when launched directly from the start menu:
* sending a script to the terminal (in VSCode) does not work: The simple scripts work. Anything involving a module such as Numpy does not work because Python cannot find Numpy, Pandas, etc. I get ImportError: DLL load failed: The specified module could not be found.
* opening a Python REPL (via VSCode) works Right
* Jupyter server does starts Right
Is that right? See my answers above.
Here are some other questions I have:
1. did you also install VSCode (and the Python extension) directly? did that have the same problems? I have tried both. Makes no difference.
2. what specific steps does "Running a Python Program by sending it to Terminal" represent? Opening the program in VSCode and selecting start debugging from the debug money, or press F5, or right click the code and select “Run Selection/Line in Python Terminal”. [My default for Shift-Enter is to send it to Python “Run Selection/Line in Python Interactive Window.”]
3. in the start menu case, how does "Running a Python Program by sending it to Terminal" fail, specifically? See my answer above. Simple code without external modules works. Anything involving a module such as Numpy does not work because Python cannot find Numpy, Pandas, etc. I get ImportError: DLL load failed: The specified module could not be found.
4. what specific steps does "Launching the Interactive Window" represent?: Right-clicking the code and selecting Run Selection/Line in Python Interactive Window OR Shift+Enter OR Selecting Python: Show Interactive Window from the Command Palette.
5. what are you doing to launch the Jupyter server? Selecting Python: Show Interactive Window from the Command Palette. I have assigned a Keyboard Shortcut Ctrl+Shift+I to it.
Hope this clarifies.
Again, sorry for all the indirection. Let's solve this. Thanks for your help.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#5145 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/At8EqTe42ptljd05D77dkhZFPBar7nT6ks5vfmaTgaJpZM4cghqi> . <https://github.com/notifications/beacon/At8EqUlJHb8CB0E-vw4SyrfMtwKK7BpIks5vfmaTgaJpZM4cghqi.gif>
|
I haven't read through your response yet, but wanted to clarify something in the meantime.
Here are the things I'm aware of for which an update may have caused the problem:
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? |
This likely falls under #4568. |
Hi Eric,
I read quite a bit of the postings about #4568 <#4568> . I am not clear about what I am supposed to do.
Thanks.
Best,
Dan Gode
From: Eric Snow <notifications@github.com>
Sent: Thursday, April 11, 2019 1:34 PM
To: Microsoft/vscode-python <vscode-python@noreply.github.com>
Cc: Dan Gode <dan.gode@almaris.com>; Mention <mention@noreply.github.com>
Subject: Re: [Microsoft/vscode-python] Activating Python 3.7.3 64-bit ('base': conda) to run Jupyter failed with Error: Command failed (#5145)
This likely falls under #4568 <#4568> .
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#5145 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/At8EqWam_mPGDVs33RS9M42nH7NSx7PTks5vf3HsgaJpZM4cghqi> . <https://github.com/notifications/beacon/At8EqZhRVxnYnj_J-y1dkCnhTVXK2xyLks5vf3HsgaJpZM4cghqi.gif>
|
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. |
@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. |
Hi Eric,
This is what I tried yesterday.
Uninstalled VSCode. Deleted everything relating to VSCode from my computer (VSCode uninstall does not do this). Went into registry and deleted all occurrences of VSCode.
Did the same for Conda. [I had done this earlier for Conda but not VSCode.]
Reinstalled.
I have not installed the Code Formatter Black or pip that I need for other packages not included in Conda.
When installing conda, picked a different directory than the default.
Installed VSCode via Anaconda Navigator.
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.
Best,
Dan Gode
From: Eric Snow <notifications@github.com>
Sent: Wednesday, April 17, 2019 2:08 PM
To: Microsoft/vscode-python <vscode-python@noreply.github.com>
Cc: Dan Gode <dan.gode@almaris.com>; Mention <mention@noreply.github.com>
Subject: Re: [Microsoft/vscode-python] Activating Python 3.7.3 64-bit ('base': conda) to run Jupyter failed with Error: Command failed (#5145)
@dangode <https://github.com/dangode> , sorry it's taking so long to get to the bottom of this. @DonJayamanne <https://github.com/DonJayamanne> is going to be taking a look at the underlying problem in the next few days (e.g. #4402 <#4402> ). We'll keep you posted.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#5145 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/At8EqeF961vcmJJNNDQ6-mm-8tkmRVGiks5vh2LpgaJpZM4cghqi> . <https://github.com/notifications/beacon/At8EqUg1KGvBB01cvBZUEgYpvMJbUqUGks5vh2LpgaJpZM4cghqi.gif>
|
@dangode Once again, I'm sorry about these issues & understand for not wanting to install anything with the fear of breaking things. |
closing as the issue has been resolved and we're tracking conda related issues here #5344 |
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.
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?
.
The text was updated successfully, but these errors were encountered: