I came to this blog post exactly because I experienced problems with Pylance and virtualenv. My project lives in a sandbox, and it seems that Pylance can't see that from the environment variables available when VSCode was launched.
I'm a self-taught dev focused on websites and Python development.
My friends call me the "Data Genie".
When I get bored, I find tech to read about, write about and build things with.
Thanks. I'll keep that in mind if I need to scale something using Python. :)
If I use the other Python extension for VSCode, it detects dependencies nicely. I only tried Pylance because a VSCode pop-up recommended it as a better alternative, which it turned out not to be on all accounts.
I'm a self-taught dev focused on websites and Python development.
My friends call me the "Data Genie".
When I get bored, I find tech to read about, write about and build things with.
There's things I miss in VS Code that you get in PyCharm. Like builtin intellisense, debugging and refactoring support. No extensions needed.
And it can run Linting with its own linter. VS Code makes you install a linter inside your virtual env otherwise the lint options in the editor don't work.
VS Code does support templating better like for mixing HTML and JS and Liquid a single Flask jinja file. And VS Code has better support for JS files
I simply prefer not to have to change my editor every time I change programming language. The moment PyCharm gets good LSP support for Scala and Haskell, I’ll consider it. ;)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I came to this blog post exactly because I experienced problems with Pylance and virtualenv. My project lives in a sandbox, and it seems that Pylance can't see that from the environment variables available when VSCode was launched.
You may get some use of my .env file and settings.json file here.
github.com/MichaelCurrin/py-projec...
They were setup for MS Python to use a virtual env. The .env also includes a reference to a main package so that imports within the project work
Pylance might use another approach which hopefully is covered in its docs
Thanks. I'll keep that in mind if I need to scale something using Python. :)
If I use the other Python extension for VSCode, it detects dependencies nicely. I only tried Pylance because a VSCode pop-up recommended it as a better alternative, which it turned out not to be on all accounts.
There's things I miss in VS Code that you get in PyCharm. Like builtin intellisense, debugging and refactoring support. No extensions needed.
And it can run Linting with its own linter. VS Code makes you install a linter inside your virtual env otherwise the lint options in the editor don't work.
VS Code does support templating better like for mixing HTML and JS and Liquid a single Flask jinja file. And VS Code has better support for JS files
I simply prefer not to have to change my editor every time I change programming language. The moment PyCharm gets good LSP support for Scala and Haskell, I’ll consider it. ;)