Python: Using VS Code on Mac pylint errors

Summary:
Having python built in on Mac can cause issues when you try to work python code.  One such issue is that VS Code will consistently complain about pylint missing and will attempt to install.  It'll likely fail every time and also show a nice little warning suggesting to upgrade pip to the latest version.  Slight annoyances, but annoying nonetheless.

If you've installed Python 3 using brew based on my last post, then this'll be a helpful continuation.
Python: Modules installed with PIP3 on Mac not getting installed?

Resolution:
It's quite simple.


  1. Launch Visual Studio Code
  2. Code --> Preferences --> Settings
  3. In the right pane User Settings, simply add your preferred python path.
    • "python.pythonPath": "/usr/local/bin/python3"
      • brew places a pointer here for you if you followed my last post.
  4. Save
You can also set your preferred interpreter on-demand rather than statically setting it in your user settings.  See referenced link below.

References:

Comments

Popular posts from this blog

NSX-T: Release associated invalid node ID from certificate

NSX-T: vCenter and NSX-T Inventory out of Sync (Hosts in vSphere not showing up in NSX-T)

MacOS: AnyConnect VPN client was unable to successfully verify the IP forwarding table modifications.