Warning about system python in MacOS but correctly uses virtualenv
See original GitHub issueEnvironment 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).
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)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:13 (1 by maintainers)
Top Results From Across the Web
Warning about system python in MacOS but correctly uses ...
VSCode shows a warning: "Selected interpreter is macOS system python which is not recommended. Please select different interpreter" but the venv ...
Read more >How to install and run virtualenv on MacOS correctly
I just want to run virtualenv normally and create flask project ... PS. I can "sudo pip3 install flask" and "pip3 show flask"...
Read more >12. Virtual Environments and Packages — Python 3.11.1 ...
The solution for this problem is to create a virtual environment, a self-contained directory tree that contains a Python installation for a particular...
Read more >Python Virtual Environments: A Primer
In this tutorial, you'll learn how to work with Python's venv module to create and manage separate virtual environments for your Python ......
Read more >Using Python environments in VS Code
Using Python environments in VS Code. This article discusses the helpful Python environments features available in Visual Studio Code. An "environment" in ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, we are working on the fix. I just meant temp workaround.
If it is annoying you, you can set
disableInstallationChecks
to true in settings