## Environment data - VS Code version: 1.41.1 - Extension version (available under the Extensions sidebar): 2019.11.50794 - OS and version: macOS 10.14.6 - Python version (& distribution if applicable, e.g. Anaconda): 3.7.6 - Type of virtual environment used (N/A | venv | virtualenv | conda | ...): virtualenv - Relevant/affected Python packages and their versions: - Jedi or Language Server? (i.e. what is `"python.jediEnabled"` set to; more info #3977): Language Server ("python.jediEnabled": false) ## Expected behaviour Env vars set in .env file should be present in python and in terminal. ## Actual behaviour Env vars missing. ## Steps to reproduce: 1. Create an empty folder, brand new simple workspace 2. Create a `.env` file in the workspace folder 3. Set a variable `FOO=bar` in the .env file 4. Run a simple `envtest.py` python file via Cmd+Shift+P: "Run python file in terminal" ``` import os print(os.environ.get('FOO')) ``` 4. The printed value is None, the env var is not set 5. The env var is also not present in the integrated VSCode terminal `echo $FOO` FWIW, I also tried setting `python.envFile` in `.vscode/settings.json` to the absolute path of the .env file and it still does not work.
Activity
karrtikr commentedon Jan 2, 2020
Closing as dup of #944
Please upvote that issue to bump its priority.