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

Not able to run or debug #3452

Closed
ivannp opened this issue Nov 23, 2018 · 13 comments
Closed

Not able to run or debug #3452

ivannp opened this issue Nov 23, 2018 · 13 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@ivannp
Copy link

ivannp commented Nov 23, 2018

Environment data

  • VS Code version: 1.29.1 (latest)
  • Extension version (available under the Extensions sidebar): 2018.10.1
  • OS and version: windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): anaconda
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Relevant/affected Python packages and their versions:

Actual behavior

Trying to debug or run a file loaded in vscode always tells me that I need to select an interpreter. After I do that, see the image below confirming that an interpreter is set:

image

I keep getting:

image

Expected behavior

Being able to run the file with the selected interpreter

@brettcannon
Copy link
Member

What is "python.pythonPath" set to and what is the output if you run it from the command-line with -V?

This is not being reported by anyone else so this very likely is due to something unique on your system.

@brettcannon brettcannon added triage info-needed Issue requires more information from poster labels Nov 23, 2018
@brettcannon
Copy link
Member

And what does conda env list output?

@glutanimate

This comment has been minimized.

@glutanimate

This comment has been minimized.

@brettcannon brettcannon self-assigned this Dec 3, 2018
@brettcannon
Copy link
Member

@glutanimate I don't think we ever officially supported it (I believe we do support ~, though, so you can switch to that). If you would like support for $[env:HOME} then please open an issue for that feature request.

@lanza

This comment has been minimized.

@d0m72

This comment has been minimized.

@brettcannon
Copy link
Member

FYI I am waiting to hear back from @ivannp about his settings. Everyone else asking for some {env: ...} support, please open a separate issue as a feature request.

@DonJayamanne
Copy link

@brettcanjon {env:HOME} is supported. Just like `{workspace folder}

@DonJayamanne
Copy link

Duplicate of #3392

@DonJayamanne DonJayamanne marked this as a duplicate of #3392 Dec 11, 2018
@ivannp
Copy link
Author

ivannp commented Dec 12, 2018

Hi Brett,

Here is the output:

(C:\utils\anaconda3) C:\Users\ivannp>conda env list
# conda environments:
#
def                      C:\utils\anaconda3\envs\def
ib                       C:\utils\anaconda3\envs\ib
redeal                   C:\utils\anaconda3\envs\redeal
tensorflow               C:\utils\anaconda3\envs\tensorflow
root                  *  C:\utils\anaconda3

I am using the def environment both from command line and from Visual Studio. It's unlikely that there is any issue with it.

Also have tried different settings for python.pythonPath. Here is what I currently have in settings.json which shows in vscode:

{
    "python.pythonPath": "C:\\utils\\anaconda3\\envs\\def\\python.exe"
}

When I run it, I get:

(C:\utils\anaconda3) C:\Users\ivannp>"C:\\utils\\anaconda3\\envs\\def\\python.exe" --version
Python 3.6.6 :: Anaconda, Inc.

In addition, I removed other python.exe from the path - no success. Where is vscode loading the interpreter from? Are there any other places that it might be looking?

@d0m72
Copy link

d0m72 commented Dec 12, 2018

FYI I am waiting to hear back from @ivannp about his settings. Everyone else asking for some {env: ...} support, please open a separate issue as a feature request.

@brettcannon FYI the support of {env:...} was working on previous releases. That's what I meant in my report.

@microsoft microsoft locked as resolved and limited conversation to collaborators Dec 12, 2018
@brettcannon
Copy link
Member

@ivannp @d0m72 please note that this was closed as a duplicate of another issue, so any updates should go on the other issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

6 participants