question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Intellisense does not work in Python 2.7.15

See original GitHub issue

Environment data

  • VS Code version: 1.30.2
  • Extension version: Python 2019.1.0
  • OS and version: OS X Mojave
  • Python version: 2.7.15
  • Type of virtual environment used: brew python
  • Relevant/affected Python packages and their versions:
  • Extendsions: Python and Visual Studio IntelliCode.

Settings

{
    "editor.fontSize": 14,
    "python.pythonPath": "/usr/local/bin/python",
    "python.jediEnabled": false,
    "files.autoSave": "afterDelay",
    "editor.minimap.enabled": false,
}

Expected behaviour

VSCode can show some suggestion for variable.

intellisense02

Actual behaviour

The package can autocomplete, such as 1

But, can’t recognize the type of variable and no suggestion, like 2 3

Steps to reproduce:

Write those code on my png. I had tried set “python.jediEnabled”: false, not work too.

Logs

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

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
jarviszeng-zjccommented, Feb 10, 2019

Hi @Ronkiro @zengjice Please could you re-enable the language server and tell me what errors are logged in the Python output panel

Sorry. No more log in Python output.

Starting Microsoft Python language server.
##########Linting Output - flake8##########
4,2,E,E999:SyntaxError: invalid syntax
4,3,W,W292:no newline at end of file
Microsoft Python Language Server version 0.1.78.0
Initializing for /usr/local/bin/python
##########Linting Output - flake8##########
4,2,E,E999:SyntaxError: invalid syntax
4,3,W,W292:no newline at end of file
0reactions
Ronkirocommented, Feb 14, 2019

It was showing no errors.

I found out that my PythonPath was pointing to py.exe (I changed the Python files). Re-pointing to python.exe solved the problem for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

New style IntelliSense does not work for Python 2.7 environment
"Use new style IntelliSense for environments" checkbox is on: Nothing happens for file when current is Python 2.7 environment. File is processed when...
Read more >
Visual Studio Code: Intellisense not working - Stack Overflow
Open the commands window again and search this time for Settings . Select Prefernces: Open settings (JSON) . · In the JSON file...
Read more >
Microsoft.PythonTools.Analyzer.exe stuck at parsing psutil ...
Please go to Tools, Options, Python, Experimental and enable "Use new style IntelliSense for environments". Despite the option remaining under "Experimental", ...
Read more >
Porting Python 2 Code to Python 3 — Python 3.11.1 ...
Python 2.6 is no longer freely supported and thus is not receiving bugfixes. This means you will have to work around any issues...
Read more >
Intellisense step by step configuration on visual studio code
Hello, I am running into issues where VS Code doesn't appear to see my python correctly? Here is my user settings currently, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found