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

Pylance does not resolve imports automatically after installation #1166

Closed
satheeshkatipomu opened this issue Apr 16, 2021 · 5 comments
Closed
Labels
duplicate This issue or pull request already exists

Comments

@satheeshkatipomu
Copy link

satheeshkatipomu commented Apr 16, 2021

Environment data

  • Language Server version: 2021.4.1
  • OS and version: linux x64
  • Python version (and distribution if applicable, e.g. Anaconda): 3.8
  • python.analysis.indexing: undefined
  • python.analysis.typeCheckingMode: off

Expected behaviour

pylance automatically resolves a package imports when it is installed.

Actual behaviour

After installing a package, pylance is unable to resolve the import unless reopening the window. Instead it is returning an error reportMissingImports

Screenshot 2021-04-16 at 7 05 42 PM

@navneethc

This comment has been minimized.

@satheeshkatipomu satheeshkatipomu changed the title Pylance imports are not automatically resolved Pylance does not resolve imports automatically after installation Apr 16, 2021
@jakebailey

This comment has been minimized.

@satheeshkatipomu
Copy link
Author

satheeshkatipomu commented Apr 16, 2021

Hey @jakebailey

BTW my imports are not local imports. These are packages from PyPI index. I did try explicitly mentioning site-packages path in extra paths, but no luck there. I am facing this issue in both my local and remove dev container environments.

Let me try the WIP option.

@jakebailey
Copy link
Member

Agh, I'm sorry; I was referring to @navneethc and missed your actual issue. Don't set that to fix your issue with installing packages. That's a known issue for interpreters that live outside the workspace, and I'll find the issue we have for that already.

@jakebailey
Copy link
Member

The issue about needing a reload on package install is #923; I tried to fix it once but it caused some problems so was reverted. You can follow that issue instead.

@jakebailey jakebailey added the duplicate This issue or pull request already exists label Apr 16, 2021
@github-actions github-actions bot removed the triage label Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants