-
Notifications
You must be signed in to change notification settings - Fork 9
Atom
-
Install Atom and the ide-python package:
brew cask install atom apm install atom-ide-ui apm install ide-python
-
Create a Python virtualenv and install
pyls-black
along with its dependencies:# Create a directory to keep your virtualenvs in mkdir -p ~/.virtualenvs # Create a new virtualenv python3 -m venv ~/.virtualenvs/ide-python # Install pyls-black in the newly created virtualenv ~/.virtualenvs/ide-python/bin/python3 -m pip install pyls-black
Note: this will create a virtualenv in
~/.virtualenvs/ide-python
but the exact location is up to you! -
Set the Python path in the
ide-python
:Atom → Preferences → Packages →
ide-python
→ Under Settings → Python ExecutableIt should be set to the full path to the Python executable created in the previous step:
/Users/rupert/.virtualenvs/ide-python/bin/python3
(replace/Users/rupert
with the path to your home folder -~
is not expanded).An alternative is to update your Atom config file directly:
# config.cson "*": "ide-python": python: "/Users/rupert/.virtualenvs/ide-python/bin/python3"
Atom → Preferences → Packages → atom-ide-ui
→ Under Code Formatting → Format on Save
Alternatively you can update your Atom config file directly:
# config.cson
"*":
"atom-ide-ui":
"atom-ide-code-format":
formatOnSave: true