My VSCode is using a locally installed anaconda environment, at the default directory, which places it in Program Files. Because of this I'm unable to install flake8 through VSCode, I get a permission error. If I update my conda environment at the local level to install flake8, does anyone know if VSCode recognize and be able to use the package then?
            Asked
            
        
        
            Active
            
        
            Viewed 5.5k times
        
    4 Answers
34
            Usually yeah it will. But if it doesn't work for you, then you can try specifying absolute path to flake8 and enable it explicitly like so :
"python.linting.flake8Enabled": true,  
"python.linting.flake8Path": "path/to/flake8",  
you can even specify path to your conda environment :
"python.condaPath": "path/to/condaenv/",
        Yedhin
        
- 2,931
 - 13
 - 19
 
- 
                    This worked for me - in VS, you simply open Setting, search for `flak8`, find needed path, and insert in corresponding JSON file for flake8 configuration. – nate Aug 04 '20 at 17:39
 
19
            
            
        Have you tried to:
- ctrl + shift + p
 - write "select linter" then click on it
 - click on flake8
 
Maybe that helps.
        Abimael Domínguez
        
- 467
 - 5
 - 6
 
4
            
            
        Yes, it will. You'll have to install flake8 into each environment that you specify as an interpreter for a project in VSCode.
        darthbith
        
- 18,484
 - 9
 - 60
 - 76
 
- 
                    Is there a way to bypass the permission error in VSCode to install from there? I just tried installing through anaconda navigator which worked fine but VSCode isn't recognizing it, either way you answered my question. Thank you – Chris Macaluso Jan 12 '19 at 13:59
 
1
            
            
        I just installed Flake8 extension to VSCode as shown below. *I use Anaconda on Windows 11:
Then, it works properly as shown below:
        Super Kai - Kazuya Ito
        
- 22,221
 - 10
 - 124
 - 129
 

