(Jun-03-2020, 11:38 AM)ErnestTBass Wrote: I am using a jupyter notebook on Ubuntu with python 3.7.7.We have talk a lot about setup and environment in your previous Thread.
If you use Anaconda as in your other post,most remember to activate
base
.Then test with
pip -V
and it should now point to the Anaconda placement.Here a quick test on Windows now,could do the same on Linux no difference.
G:\Anaconda3 λ G:\Anaconda3\Scripts\activate (base) G:\Anaconda3 λ pip -V pip 20.0.2 from G:\Anaconda3\lib\site-packages\pip (python 3.7) (base) G:\Anaconda3 λ pip install nb-black Collecting nb-black ..... Successfully built nb-black Installing collected packages: nb-black Successfully installed nb-black-1.0.7 (base) G:\Anaconda3 λ jupyter lab [I 17:11:58.129 LabApp] JupyterLab extension loaded from g:\anaconda3\lib\site-packages\jupyterlabSo no have installed
nb-black
and start jupyter lab
all in base
environment.Test
%load_ext lab_black def foo(): return 42 thisdict = {"brand": "Ford", "model": "Mustang", "year": 1964, "brand": "Bmw", "model": "M3", "year": 1980}Run cell:
def foo(): return 42 thisdict = { "brand": "Ford", "model": "Mustang", "year": 1964, "brand": "Bmw", "model": "M3", "year": 1980, }So if work as expected black dos it's job and formatting the code in NoteBook.