forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Milestone
Description
Refs: #20905
- linux @roblourens
- linux @TylerLeonhardt
- wsl @cwebster-99
Complexity: 3
Requirements
You need a linux flavor derived from debian. Check the following before testing:
- Your
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. - 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
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.