Home VSCode, Python, Jupyter, ...
Post
Cancel

VSCode, Python, Jupyter, ...

Hacks

Complete the procedure below accurately. These are absolutely required and must be 100% accurate for your success.

GitHub Account

MacOS 1st Time Developer

VSCode install

Anaconda install

  • Download for MacOS: Anaconda
  • Run Install: Answer yes to questions

Homebrew install

  • Copy and Paste to Install from Terminal Homebrew
    • Copy bash ... curl ... command using copy box on website
    • Launch terminal from search bar
    • Paste bash ... curl ... command into Terminal …
    • Make sure command starts, this should provide feedback/output in terminal and could take a long time, like 10-min, there could be a prompt in the middle, at about 5-minutes. Follow any on screen instructions provided in terminal output to finish.
  • Homebrew installs a tool called “brew” which helps add and manage developer packages on MacOS.

At this point, the next task is to prepare tools. You must start a new Terminal. Now the Terminal prompt should be prefixed with (base). If not, you need to go back to Anaconda install.

  • Open new Terminal, your prompt should look like this…
    1
    
    (base) iMac:~ jmort1021$
    

Key Packages needed on MacOS

  • Close and Start a new terminal, run each command in Terminal
    1
    2
    3
    4
    5
    6
    
    $ brew list # list packages
    $ brew update # update package list
    $ brew upgrade # upgrade packages
    $ brew install git  # install latest git
    $ brew install python # install python3 for development
    $ python --version # version of python3 installed
    

    Windows 1st Time Developer

    VSCode install using WSL. Windows users have option to have best of Windows and Linux while developing within VSCode.

  • Install VSCode using WSL
  • Required review, become familiar with Windows WSL development

Anaconda install on WSL.

  • Try the exact commands in WSL Command / Powershell.
  • Only if there is a wget error… To find the latest Linux-x86 distribution hover over 64-Bit (x86) Installer of this page: https://www.anaconda.com/download#downloads. Hover over wget and Anaconda3 commands based on new link.
    1
    2
    3
    4
    5
    6
    
    PS C:\Users\UserName> wsl  # Windows prompt to WSL command
    $ cd /tmp
    $ wget https://repo.anaconda.com/archive/Anaconda3-2023.03-1-Linux-x86_64.sh
    $ chmod +x Anaconda3-2023.03-1-Linux-x86_64.sh
    # Answer yes to all the prompts
    $ ./Anaconda3-2023.03-1-Linux-x86_64.sh
    

At this point, the next task is to prepare for Packages, Jupyter Notebooks, and Kernels. You must start a new WSL Command / Powershell. Now the WSL prompt should be prefixed with (base) from Anaconda install. If not, you need to go back to Anaconda install.

  • Open Command / Powershell. If you are not looking like this you need to back up.
    1
    2
    3
    
    PS C:\Users\ShayM> wsl  # Windows prompt
    (base) shay@MSI:/mnt/c/Users/ShayM$ cd ~ # WSL prompt
    (base) shay@MSI:~$ # WSL home, best place to install files
    

Key Packages needing update on WSL Ubuntu

  • In a WSL Command / Powershell install Python3 ```bash $ sudo apt list # list packages $ sudo apt update # update package list $ sudo apt upgrade # upgrade packages $ sudo apt install python3 python3-pip # install python3 and pip3 for development $ python –version # version of python3 should be shown

Jupyter Install and Kernels (MacOs and WSL)

Install Jupyter and check python kernel

1
2
3
4
5
(base) id:~$ conda --version 
(base) id:~$ conda install jupyter # install jupyter
(base) id:~$ jupyter kernelspec list # list installed kernels
Available kernels:
  python3    /home/shay/.local/share/jupyter/kernels/python3
This post is licensed under CC BY 4.0 by the author.