VS Code Intellisense not working with Conda Python environment
Asked Answered
A

2

12

Intellisense: not working with conda (above), working fine when normal Python (below)

As shown above, Intellisense does not work in VS Code when Conda Environment is set as Python interpreter, it is just keeps “Loading…”. When normal Python interpreter is set (that comes when installing Python extension), Intellisense is working fine. There are no problems to run or debug files with both environment, only issues is Intellisense in Conda Environment.

I have tried at least following things without any success.

System info:
Version: 1.47.3 (user setup)
Commit: 91899dcef7b8110878ea59626991a18c8a6a1b3e
Date: 2020-07-23T13:12:49.994Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.16299

Agreeable answered 12/8, 2020 at 11:56 Comment(0)
E
9

I found a similar problem, they solve it through explicitly set the python.pythonPath, you can refer to this page.

In your problem, only when selecting the conda interpreter the Intellisense not work as the Intellisense was provided by the Language Server, Could you try these?

  1. Select a different Language Server, The Language Server includes: 'Jedi'(build-in Python extension ), 'Microsoft', 'Pylance'(need install Pylance extension).

  2. downgrade or upgrade the 'Python' extension.

If it still not work, you can try these to find more information which will be helpful to solve the problem:

  1. Look in the OUTPUT panel, select the 'Python Language Server' channel to check whether the Language Server works well.

  2. Open Help -> Toggle Developer Tools select the Console panel to take a check.

Especial answered 17/8, 2020 at 6:57 Comment(2)
Thank you very much, this seems a solution I needed. The reason why only "seems" is that the problem was solved in my computer when VS Code (automatically) updated to newer version. Anyway, good to have a solution here if(/when :)) problem arises again.Bizarre
@AnttiMäki what exactly solved the problem in the end for you? For me only Jedi worked; default & Pylance did not workDanutadanya
H
-1

And another suggestion

https://code.visualstudio.com/docs/python/environments : There are two types of environments that you can create for your workspace: virtual and conda environments.

you have to work into a workspace

Hybrid answered 10/4, 2023 at 12:34 Comment(1)
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From ReviewRennie

© 2022 - 2024 — McMap. All rights reserved.