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 How to update the language server to the latest stable version #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:
Create an empty folder, brand new simple workspace
Create a .env file in the workspace folder
Set a variable FOO=bar in the .env file
Run a simple envtest.py python file via Cmd+Shift+P: "Run python file in terminal"
import os
print(os.environ.get('FOO'))
The printed value is None, the env var is not set
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.
Environment data
"python.jediEnabled"set to; more info How to update the language server to the latest stable version #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:
.envfile in the workspace folderFOO=barin the .env fileenvtest.pypython file via Cmd+Shift+P: "Run python file in terminal"echo $FOOFWIW, I also tried setting
python.envFilein.vscode/settings.jsonto the absolute path of the .env file and it still does not work.