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

VS Code gives error there is no interpreter selected #3326

Closed
qubitron opened this issue Nov 13, 2018 · 4 comments
Closed

VS Code gives error there is no interpreter selected #3326

qubitron opened this issue Nov 13, 2018 · 4 comments
Labels
feature-request Request for new features or functionality

Comments

@qubitron
Copy link

Environment data

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

Actual behavior

image

After clicking X:
image

Similar issue on macOS but instead it says "the default interpreter is invalid.

Expected behavior

VS Code selects a default python interpreter, or only does the second step

Steps to reproduce:

  1. mkdir newapp
  2. code .
  3. add hello.py
  4. open it

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

XXX
@brettcannon brettcannon added feature-interpreter bug Issue identified by VS Code Team member as probable bug labels Nov 13, 2018
@DonJayamanne
Copy link

@qubitron
Are you testing this against the latest development version of the extension?
If not, please could you do so.

@qubitron
Copy link
Author

Yes, I still have the issue against the latest development version of the extension (2018.11.0-alpha), on a mac:

mkdir newapp
cd newapp
code .

Create new file "hello.py"
image

Click the close button and then the interpreter shows:
image

@DonJayamanne
Copy link

DonJayamanne commented Nov 14, 2018

VS Code selects a default python interpreter, or only does the second step

Ok, I think I know what we need to do.
When VS Code loads and displays this message we need two options:

  • [Change Default Python Interperter]
    • This will change the default python interpreter for the user in VS Code.
    • We basically update python.pythonPath in the user settings.json file
  • [Select Python Interpeter]
    • Same as today, we update python.pythonPath in the workspace settings.json file

Next time VSC loads, user will not be prompted.

@qubitron
Please could you try the following:

  • Open VSC, go into your user settings.json
  • Update python.pythonPath to point to a valid python executable
  • Reload VS Code (test this issue all over again), confirm this resolves the issue.

screen shot 2018-11-14 at 2 42 36 pm

@DonJayamanne DonJayamanne added feature-request Request for new features or functionality and removed bug Issue identified by VS Code Team member as probable bug labels Nov 15, 2018
@DonJayamanne
Copy link

DonJayamanne commented Nov 15, 2018

Changes:

  • Remove dup ls message
  • Auto select python environment before python validations
  • Change label from 'available' to 'installed'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants