Coder Social home page Coder Social logo

Command select python interpreter doesn't list all of the installed python interpreters on system, including those on virtual environment about vscode-python HOT 14 CLOSED

microsoft avatar microsoft commented on June 14, 2024
Command select python interpreter doesn't list all of the installed python interpreters on system, including those on virtual environment

from vscode-python.

Comments (14)

tangorboyz avatar tangorboyz commented on June 14, 2024 2

I don't know if this could help, but:

workbench.main.js:sourcemap:10 command 'python.updateFeedbackCounter' not found: Error: command 'python.updateFeedbackCounter' not found
    at t._tryExecuteCommand (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:1111105)
    at file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:1110944
    at n.Class.define.cancel.then (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:70382)
    at t.executeCommand (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:1110918)
    at e.$executeCommand (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:2847469)
    at t.e.invoke (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:2902414)
    at e._invokeHandler (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:2481583)
    at e._receiveOneMessage (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:2481273)
    at file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:2480300
    at file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:2482219
e.onUnexpectedError @ workbench.main.js:sourcemap:10
(anonymous) @ workbench.main.js:sourcemap:10
e.onUnexpectedError @ workbench.main.js:sourcemap:9
o @ workbench.main.js:sourcemap:9
e.$onUnexpectedError @ workbench.main.js:sourcemap:9
e.invoke @ workbench.main.js:sourcemap:9
e._invokeHandler @ workbench.main.js:sourcemap:9
e._receiveOneMessage @ workbench.main.js:sourcemap:9
(anonymous) @ workbench.main.js:sourcemap:9
(anonymous) @ workbench.main.js:sourcemap:9
e.invoke @ workbench.main.js:sourcemap:9
e.fire @ workbench.main.js:sourcemap:9
(anonymous) @ workbench.main.js:sourcemap:9
emitOne @ events.js:96
emit @ events.js:191
readableAddChunk @ _stream_readable.js:178
Readable.push @ _stream_readable.js:136
onread @ net.js:560
workbench.main.js:sourcemap:10 command 'python.updateFeedbackCounter' not found: Error: command 'python.updateFeedbackCounter' not found
    at t._tryExecuteCommand (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:1111105)
    at file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:1110944
    at n.Class.define.cancel.then (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:70382)
    at t.executeCommand (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:1110918)
    at e.$executeCommand (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:2847469)
    at t.e.invoke (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:2902414)
    at e._invokeHandler (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:2481583)
    at e._receiveOneMessage (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:2481273)
    at file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:2480300
    at file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:2482219
e.onUnexpectedError @ workbench.main.js:sourcemap:10
(anonymous) @ workbench.main.js:sourcemap:10
e.onUnexpectedError @ workbench.main.js:sourcemap:9
o @ workbench.main.js:sourcemap:9
e.$onUnexpectedError @ workbench.main.js:sourcemap:9
e.invoke @ workbench.main.js:sourcemap:9
e._invokeHandler @ workbench.main.js:sourcemap:9
e._receiveOneMessage @ workbench.main.js:sourcemap:9
(anonymous) @ workbench.main.js:sourcemap:9
(anonymous) @ workbench.main.js:sourcemap:9
e.invoke @ workbench.main.js:sourcemap:9
e.fire @ workbench.main.js:sourcemap:9
(anonymous) @ workbench.main.js:sourcemap:9
emitOne @ events.js:96
emit @ events.js:191
readableAddChunk @ _stream_readable.js:178
Readable.push @ _stream_readable.js:136
onread @ net.js:560
workbench.main.js:sourcemap:10 command 'python.updateFeedbackCounter' not found: Error: command 'python.updateFeedbackCounter' not found
    at t._tryExecuteCommand (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:1111105)
    at file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:1110944
    at n.Class.define.cancel.then (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:70382)
    at t.executeCommand (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:1110918)
    at e.$executeCommand (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:2847469)
    at t.e.invoke (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:2902414)
    at e._invokeHandler (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:2481583)
    at e._receiveOneMessage (file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:2481273)
    at file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:2480300
    at file:///usr/share/code-insiders/resources/app/out/vs/workbench/workbench.main.js:9:2482219
e.onUnexpectedError @ workbench.main.js:sourcemap:10
(anonymous) @ workbench.main.js:sourcemap:10
e.onUnexpectedError @ workbench.main.js:sourcemap:9
o @ workbench.main.js:sourcemap:9
e.$onUnexpectedError @ workbench.main.js:sourcemap:9
e.invoke @ workbench.main.js:sourcemap:9
e._invokeHandler @ workbench.main.js:sourcemap:9
e._receiveOneMessage @ workbench.main.js:sourcemap:9
(anonymous) @ workbench.main.js:sourcemap:9
(anonymous) @ workbench.main.js:sourcemap:9
e.invoke @ workbench.main.js:sourcemap:9
e.fire @ workbench.main.js:sourcemap:9
(anonymous) @ workbench.main.js:sourcemap:9
emitOne @ events.js:96
emit @ events.js:191
readableAddChunk @ _stream_readable.js:178
Readable.push @ _stream_readable.js:136
onread @ net.js:560
workbench.main.js:sourcemap:9 [Extension Host] (node:27046) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead. (at process.on (internal/process/warning.js:21:17))
t.log @ workbench.main.js:sourcemap:9
t._logExtensionHostMessage @ workbench.main.js:sourcemap:9
(anonymous) @ workbench.main.js:sourcemap:9
emitTwo @ events.js:106
emit @ events.js:194
process.nextTick @ internal/child_process.js:766
_combinedTickCallback @ internal/process/next_tick.js:73
_tickCallback @ internal/process/next_tick.js:104

That's from insider.
And this from standard version:

extensionService.ts:441 [/home/dhawu/.vscode/extensions/ms-python.python-0.8.0]: Command `jupyter.runSelectionLine` appears multiple times in the `commands` section.
extensionService.ts:441 [/home/dhawu/.vscode/extensions/ms-python.python-0.8.0]: Command `jupyter.execCurrentCell` appears multiple times in the `commands` section.
extensionService.ts:441 [/home/dhawu/.vscode/extensions/ms-python.python-0.8.0]: Command `jupyter.execCurrentCellAndAdvance` appears multiple times in the `commands` section.
extensionService.ts:441 [/home/dhawu/.vscode/extensions/ms-python.python-0.8.0]: Command `jupyter.gotToPreviousCell` appears multiple times in the `commands` section.
extensionService.ts:441 [/home/dhawu/.vscode/extensions/ms-python.python-0.8.0]: Command `jupyter.gotToNextCell` appears multiple times in the `commands` section.
extensionService.ts:441 [/home/dhawu/.vscode/extensions/ms-vscode.cpptools-0.14.2]: Command `workbench.action.gotoSymbol` appears multiple times in the `commands` section.
extensionService.ts:441 [/home/dhawu/.vscode/extensions/ms-vscode.cpptools-0.14.2]: Command `workbench.action.showAllSymbols` appears multiple times in the `commands` section.
console.ts:123 [Extension Host] vscode-icons is active!

from vscode-python.

theHamsta avatar theHamsta commented on June 14, 2024

I can confirm this issue.

Reason for this problem seems to be that the plug-in is looking for a python interpreter with the exact name "python", i.e. python3 is not found. If I create a symbolic link to "python3" with the name "python" (let's say ~/bin/python where ~/bin is in my $PATH) the interpreter can be selected again.

from vscode-python.

DonJayamanne avatar DonJayamanne commented on June 14, 2024

@tangorboyz Currently the extension lists Python interpreters located in the current PATH.
E.g. Python3 would be listed only if it is in the current path.

As for virtual environments, currently we only search for Virtual environments in the following locations:

  • ~/Envs, ~/.virtualenvs, ~/.pyenv, ~/.pyenv/versions

exact name "python", i.e. python3 is not found

@theHamsta, This is not true, the extension looks for python and python<number>.
python3 will be detected, provided it is in your current PATH.
Please could you confirm that python3 is in your current path (prior to creating the symbolic link).

Finally, you can augment the search path by editing the following setting in your settings.json file to point to the virtual environment directory containing the python interpreter:

"python.venvPath": "Path to the virtual env"

from vscode-python.

tangorboyz avatar tangorboyz commented on June 14, 2024

All my pythons are in my PATH. I could invoke each of them from terminal. E.g: for python 2.7.12, i call it with python, and for python 3.5, with python3, and python 3.6 with python3.6. The previous version of python extension could list all of of them. I don't know why the current version couldn't.
If a check with which:

  • which python: /usr/bin/python
  • which python3: /usr/bin/python3
  • which python3.6: /usr/bin/python3.6

from vscode-python.

DonJayamanne avatar DonJayamanne commented on June 14, 2024

@tangorboyz thats interesting. It python3 work at my end on ubuntu.
Could you try the following:

  • Quit vscode (ensure all instances are closed, please check if running in the background)
  • Start vscode
  • Test once again

from vscode-python.

tangorboyz avatar tangorboyz commented on June 14, 2024

no luck.

from vscode-python.

DonJayamanne avatar DonJayamanne commented on June 14, 2024

Please could you try this in the standard version of VS Code (instead of the insiders build).
Thanks

from vscode-python.

bgse avatar bgse commented on June 14, 2024

Can confirm the issue @tangorboyz has, same on my end.

Version 1.18.0
Commit dcee2202709a4f223185514b9275aa4229841aa7
Date 2017-11-08T12:44:48.751Z
Shell 1.7.9
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

Maybe related, this pops up roughly 1-2 seconds after selecting the command and showing the selection dialog:

vscode-python-console

from vscode-python.

tangorboyz avatar tangorboyz commented on June 14, 2024

I have tried it on standard version (1.18.0), the result same as insider.

from vscode-python.

DonJayamanne avatar DonJayamanne commented on June 14, 2024

@bgse the error you are seeing is related to ctags (you could either install ctags to get rid of this or disable workspace symbols).

@bgse what's your OS and Python version?

from vscode-python.

DonJayamanne avatar DonJayamanne commented on June 14, 2024

@tangorboyz looks like I'm missing something fairly obvious here as this issue has been reported by two others now.

from vscode-python.

tangorboyz avatar tangorboyz commented on June 14, 2024

Looks, like it's a regression. I've tried to install the previous version (0.7.0), from the old repository. And It could list all python version installed on my computer:

image

from vscode-python.

DonJayamanne avatar DonJayamanne commented on June 14, 2024

@tangorboyz please could you confirm there are no errors logged in the console window.
Please go into the menu Help->Toggle Developer Tools.
Something must be in there.

from vscode-python.

DonJayamanne avatar DonJayamanne commented on June 14, 2024

@tangorboyz never mind, i've identified the bug. Thanks for the info

from vscode-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.