Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Warning about system python in MacOS but correctly uses virtualenv #804

Closed
@tommyblue

Description

@tommyblue

Environment data

VS Code version: 1.20.1
Python Extension version: 2018.1.0
Python Version: 3.5.4 and 2.7.10
OS and version: MacOS 10.13.3

Actual behavior

VSCode shows a warning: "Selected interpreter is macOS system python which is not recommended. Please select different interpreter" but the venv version (3.5.4) is correctly selected (see screenshot) and seems to be correctly used (the system version is 2.7.10).
screen shot 2018-02-16 at 17 54 10

Expected behavior

The warning shouldn't be shown

Steps to reproduce:

  • cd to the project folder
  • activate the virtualenv
  • code .

Logs

Output from Python output panel

##########Linting Output - flake8##########
Traceback (most recent call last):
  File "/usr/local/bin/flake8", line 11, in <module>
    load_entry_point('flake8==3.5.0', 'console_scripts', 'flake8')()
  File "/usr/local/Cellar/flake8/3.5.0/libexec/lib/python2.7/site-packages/flake8/main/cli.py", line 16, in main
    app.run(argv)
  File "/usr/local/Cellar/flake8/3.5.0/libexec/lib/python2.7/site-packages/flake8/main/application.py", line 396, in run
    self._run(argv)
  File "/usr/local/Cellar/flake8/3.5.0/libexec/lib/python2.7/site-packages/flake8/main/application.py", line 383, in _run
    self.initialize(argv)
  File "/usr/local/Cellar/flake8/3.5.0/libexec/lib/python2.7/site-packages/flake8/main/application.py", line 361, in initialize
    self.parse_preliminary_options_and_args(argv)
  File "/usr/local/Cellar/flake8/3.5.0/libexec/lib/python2.7/site-packages/flake8/main/application.py", line 133, in parse_preliminary_options_and_args
    opts, args = self.option_manager.parse_known_args(args)
  File "/usr/local/Cellar/flake8/3.5.0/libexec/lib/python2.7/site-packages/flake8/options/manager.py", line 307, in parse_known_args
    self.parser.largs.append(err.opt_str)
AttributeError: 'OptionValueError' object has no attribute 'opt_str'
##########Linting Output - pylint##########
No config file found, using default configuration
##########Linting Output - mypy##########

Output from Console window (Help->Developer Tools menu)

screen shot 2018-02-16 at 17 59 05

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugmacos

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions