Skip to content

Visual Studio Code .env file does not provide access to PYTHONPATH #94338

@pjgoodall

Description

@pjgoodall

Problem

I expect to be able to import from modules with subdirectories of the vscode workplaceFolder.
If I try to append to PYTHONPATH using the environment file: ${workspaceFolder}/.env, I get an empty reference to PYTHONPATH within that file. I therefore cannot add the path to my modules to PYTHONPATH from ${workspaceFolder}/.env

I do not want to hard-code a manipulation of the environment into my python source.

This may be an interaction complexity between vscode and conda virtual environments

Files to recreate the environment, and further documentation are in the public github repository https://github.com/pjgoodall/test_vscode_env

Metadata

Metadata

Assignees

Labels

*caused-by-extensionIssue identified to be caused by an extensioninfo-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions