Refs: #20905
Complexity: 3
Create Issue
Requirements
You need a linux flavor derived from debian. Check the following before testing:
- Your
apt package list should not have venv (python3-venv) or pip (python3-pip). You can test this by running python3 -c "import venv" or python3 -c "import pip". Both should fail.
- Make sure you have python 3.7 or greater
The intent of this TPI is to make sure we use microvenv (shipped with python extension) as fallback when venv is not present. It should create a simplified version of the environment and should also install pip into the environment. To verify this correctly, you must ensure that the OS you are using does not contain venv or pip pre-installed. For debian based OS these are often installed via apt, and they don't ship with them out of the box.
Verification
- Ensure you have python extension pre-release installed.
- Open a folder with python file.
- With the python that you were going to use to create environment, run these (both should fail)
<python-path> -c "import venv" and <python-path> -c "import pip".
- Use the create environment command (Python: Create environment)
- Select
venv, and go through the flow.
- Select the python binary which you used above.
- After it is done, you should be able to install using
pip, from the terminal in VS Code run: .venv/bin/python -m pip install pytest.
Notes
- For this TPI, we only care to see if env is created and
pip is installed in the env. If you got an error while installing using pip that may not be related. Do report them here and I will let you know.
Refs: #20905
Complexity: 3
Create Issue
Requirements
You need a linux flavor derived from debian. Check the following before testing:
aptpackage list should not have venv (python3-venv) or pip (python3-pip). You can test this by runningpython3 -c "import venv"orpython3 -c "import pip". Both should fail.The intent of this TPI is to make sure we use
microvenv(shipped with python extension) as fallback whenvenvis not present. It should create a simplified version of the environment and should also installpipinto the environment. To verify this correctly, you must ensure that the OS you are using does not containvenvorpippre-installed. For debian based OS these are often installed viaapt, and they don't ship with them out of the box.Verification
<python-path> -c "import venv"and<python-path> -c "import pip".venv, and go through the flow.pip, from the terminal in VS Code run:.venv/bin/python -m pip install pytest.Notes
pipis installed in the env. If you got an error while installing usingpipthat may not be related. Do report them here and I will let you know.