forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Description
Environment data
- VS Code version: 1.51.1
- Extension version (available under the Extensions sidebar): v2020.11.371526539
- OS and version: Mac OS 10.5.7 (Catalina) and Mac OS 11.0.1 (Big Sur)
- Python version (& distribution if applicable, e.g. Anaconda): 3.8.5, 3.8.6, 3.9.0
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): Pipenv
- Relevant/affected Python packages and their versions: pipenv v2020.11.15
- Relevant/affected Python-related VS Code extensions and their versions: Python v2020.11.371526539 or Pylance v2020.11.2
- Value of the
python.languageServer
setting: Jedi or Pylance
Expected behaviour
When working in a Pipenv environment, the Pipenv virtual environment would be activated and pipenv install
would be used for any installations instead of pip
Actual behaviour
The virtual environment is activated but Pipenv is not and pipenv commands are not used, only pip commands.
Steps to reproduce:
- Create a new project directory
- Initialize a new Pipenv environment using
pipenv install
- Open the project directory in VS Code
- Choose "Select Interpreter" from the command palette and select the virtual environment interpreter (e.g.
./.venv/bin/python
) - Exit VS Code
- Re-open the project directory in VS Code
- Open or create a Python file to trigger automatic linting or formatting. When prompted to install a formatted or linter in the new virtual environment, click Install.
- VS Code will open a terminal, activate the virtual environment and then run a
pip install -U package_name
Logs
Output from Terminal
source /Users/josephgruber/Desktop/vscode_pipenv_test/.venv/bin/activate
/Users/josephgruber/Desktop/vscode_pipenv_test/.venv/bin/python /Users/josephgruber/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py pip install -U bandit
Output for Python
in the Output
panel
User belongs to experiment group 'AlwaysDisplayTestExplorer - experiment'
User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'ShowExtensionSurveyPrompt - enabled'
User belongs to experiment group 'DebugAdapterFactory - experiment'
User belongs to experiment group 'PtvsdWheels37 - experiment'
User belongs to experiment group 'UseTerminalToGetActivatedEnvVars - control'
User belongs to experiment group 'LocalZMQKernel - experiment'
User belongs to experiment group 'CollectLSRequestTiming - control'
User belongs to experiment group 'CollectNodeLSRequestTiming - experiment'
User belongs to experiment group 'EnableIPyWidgets - experiment'
User belongs to experiment group 'RunByLine - experiment'
User belongs to experiment group 'CustomEditorSupport - control'
User belongs to experiment group 'pythonaacf'
User belongs to experiment group 'pythonInstallFlake8ButtonFirst'
> conda --version
> conda info --json
> python3.7 ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python3.6 ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python3 ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python2 ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
Starting Jedi Python language engine.
Python interpreter path: ./.venv/bin/python
> conda --version
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.prefix)"
cwd: ~/Desktop/vscode_pipenv_test
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.prefix)"
cwd: ~/Desktop/vscode_pipenv_test
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
cwd: ~/Desktop/vscode_pipenv_test
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
cwd: ~/Desktop/vscode_pipenv_test
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
cwd: ~/Desktop/vscode_pipenv_test
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
cwd: ~/Desktop/vscode_pipenv_test
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py site --user-site
cwd: ~/Desktop/vscode_pipenv_test
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py site --user-site
cwd: ~/Desktop/vscode_pipenv_test
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/completion.py
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/completion.py
Error 2020-11-26 12:14:27: stderr jediProxy Error (stderr) /Users/josephgruber/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/completion.py:584: DeprecationWarning: Deprecated since version 0.16.0. Use Script(...).get_names instead.
jedi.api.names(
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py bandit -f custom --msg-template {line},0,{severity},{test_id}:{msg} -n -1 ~/Desktop/vscode_pipenv_test/test.py
cwd: ~/Desktop/vscode_pipenv_test
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py bandit -f custom --msg-template {line},0,{severity},{test_id}:{msg} -n -1 ~/Desktop/vscode_pipenv_test/test.py
cwd: ~/Desktop/vscode_pipenv_test
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py flake8 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/Desktop/vscode_pipenv_test/test.py
cwd: ~/Desktop/vscode_pipenv_test
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py flake8 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/Desktop/vscode_pipenv_test/test.py
cwd: ~/Desktop/vscode_pipenv_test
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py mypy --ignore-missing-imports --follow-imports=silent --show-column-numbers ~/Desktop/vscode_pipenv_test/test.py
cwd: ~/Desktop/vscode_pipenv_test
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py mypy --ignore-missing-imports --follow-imports=silent --show-column-numbers ~/Desktop/vscode_pipenv_test/test.py
cwd: ~/Desktop/vscode_pipenv_test
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py pycodestyle --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/Desktop/vscode_pipenv_test/test.py
cwd: ~/Desktop/vscode_pipenv_test
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py pycodestyle --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/Desktop/vscode_pipenv_test/test.py
cwd: ~/Desktop/vscode_pipenv_test
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py pylint --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text ~/Desktop/vscode_pipenv_test/test.py
cwd: ~/Desktop/vscode_pipenv_test
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py pylint --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text ~/Desktop/vscode_pipenv_test/test.py
cwd: ~/Desktop/vscode_pipenv_test
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import bandit"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import bandit"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import flake8"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import flake8"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import mypy"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import mypy"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import pycodestyle"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import pycodestyle"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import pylint"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import pylint"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import bandit"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import bandit"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import flake8"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import flake8"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import pycodestyle"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import pycodestyle"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import mypy"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import mypy"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import pylint"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import pylint"
Linter 'bandit' is not installed. Please install it or select another linter".
Error: Module 'bandit' not installed.
Linter 'flake8' is not installed. Please install it or select another linter".
Error: Module 'flake8' not installed.
Linter 'pycodestyle' is not installed. Please install it or select another linter".
Error: Module 'pycodestyle' not installed.
Linter 'mypy' is not installed. Please install it or select another linter".
Error: Module 'mypy' not installed.
Linter 'pylint' is not installed. Please install it or select another linter".
Error: Module 'pylint' not installed.
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import pip"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import pip"
> ~/Desktop/vscode_pipenv_test/.venv/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import bandit"
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug