You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Warning about system python in MacOS but correctly uses virtualenv #804
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).
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)
Please could you install the Insiders build of the extension (see here under Insiders Build).
Please install that and re-test. It may be fixed in the master branch (soon to be released).
constpythonInstaller=newPythonInstaller(serviceContainer);pythonInstaller.checkPythonInstallation(PythonSettings.getInstance()).catch(ex=>console.error('Python Extension: pythonInstaller.checkPythonInstallation',ex));// This must be completed before we can continue.awaitinterpreterManager.autoSetInterpreter();
Also shouldn't we be looking for just the Osx python installs instead of checking if the phon installation is undefined (i.e. if all interpreters in the list start with /usr/bin/python or similar then they are the OSX interpreters that aren't supported). Not sure if we're also checking the os.
Activity
MikhailArkhipov commentedon Feb 16, 2018
If it is annoying you, you can set
disableInstallationChecksto true in settingstommyblue commentedon Feb 16, 2018
well, thanks for the suggestion, but it's not a matter of be annoyed 😀
It's that the message is wrong, the editor acts differently from what it says
DonJayamanne commentedon Feb 16, 2018
Please could you install the Insiders build of the extension (see here under Insiders Build).
Please install that and re-test. It may be fixed in the master branch (soon to be released).
MikhailArkhipov commentedon Feb 17, 2018
Yes, we are working on the fix. I just meant temp workaround.
tommyblue commentedon Feb 17, 2018
Don Jayamanne (@DonJayamanne) unfortunately the issue persists with the insider build (2018.2.0-alpha)
rpranshu commentedon Feb 17, 2018
why not add an interpreter menu in the IDE itself to select the interpreter from the system?
tommyblue commentedon Feb 17, 2018
Pranshu Ranakoti (@rpranshu) I think you're talking of the menu you get if you click on the python version in the bottom bar.
DonJayamanne commentedon Feb 17, 2018
Will look into this.
Mikhail Arkhipov (@MikhailArkhipov)
We need to perform the check after seeing the interpreter.
Also shouldn't we be looking for just the Osx python installs instead of checking if the phon installation is undefined (i.e. if all interpreters in the list start with /usr/bin/python or similar then they are the OSX interpreters that aren't supported). Not sure if we're also checking the os.
MaherBouidani commentedon Mar 5, 2018
Yes, It keeps appearing for me as well as "Linting is not installed.....install" and when I clicked on install "Linting could not be found"
MattCraftsCode commentedon Apr 19, 2018
add this key-value line in vscode settings:
cristtopher commentedon Apr 23, 2018
@heshiweij after add it, still appears message
brettcannon commentedon Apr 23, 2018
Please open a new issue if you're incorrectly getting the banner.
muzi131313 commentedon May 9, 2018
Configuring Python environments :
===============
if your install your python by yum, and you was not able to uninstall system's python, you can set alias in your .bash_profile:
and then:
source .bash_profilecheck work well or not by the command: