layout | title | description |
---|---|---|
default |
Linux Setup |
Instructions for setting up on Linux |
You already have it!
Depending on which version of Linux you’re running you may need to type bash
inside the terminal to access it.
To check whether this is necessary, follow these steps:
- Open a terminal and type
echo $SHELL
. If it reads/bin/bash
then you are all set! If not, whenever the instructions read "open a terminal," please assume you are to open a terminal, typebash
, and the proceed with the instructions as specified.
You may already have it; try typing sudo apt-get install git
(Ubuntu, Debian) or sudo yum install git
(Fedora) inside the terminal.
If you are prompted to install it follow the instructions on-screen to do so.
- Go to this page and click the download button for either the .deb (Ubuntu, Debian) or the .rpm (Fedora, CentOS) file.
- Double-click the downloaded file to install VSCode. (You may be prompted to type your administrator password during the install).
- Open the Visual Studio Code application.
- Press
Ctrl+Shift+P
in the new window that opens and type "Extensions: Install extensions" into the search bar that appears at the top of the screen. Select the appropriate entry from the dropdown menu that appears (there should be four entries; simply select the one that reads "Extensions: Install extensions"). - A new panel should appear on the left-hand side of the screen with a search bar.
Search for each of the following extensions and press
Install
for the first entry that appears. (The author listed for all of these extensions should be "Microsoft".)- Python (n.b., you will need to reload VSCode after installing this)
- Live Share (n.b., you may need to press "Ctrl/Cmd+Shift+P" and type "install extensions" again after installing this)
- Live Share Extension Pack
- Docker
-
Open a new terminal and type the following lines (separately) into the terminal, pressing
Enter
after each one:wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh
-
A license agreement will be displayed and the bottom of the terminal will read
--More--
. PressEnter
or the space bar until you are prompted with "Do you accept the license terms? [yes|no]." Typeyes
and then pressEnter
-
The installation script will inform you that it is going to install into a default directory (e.g.,
/home/$USER/miniconda3
). Leave this default and pressEnter
. -
When you are asked "Do you wish the installer to initialize Miniconda3 by running conda init? [yes|no]," type
yes
and pressEnter
. Exit the terminal once the installation has finished. -
Re-open a new terminal. Type
which python
into the terminal and it should return a path (e.g.,/home/$USER/miniconda3/bin/python
).- If you do not see a path like this then please try typing
conda init
, closing your terminal, and repeating this step. If your issue is still not resolved skip the following step and contact an instructor on the #help-installation channel of the BHS Slack.
- If you do not see a path like this then please try typing
-
Type the following to remove the installation script that was downloaded:
rm ./Miniconda3-latest-Linux-x86_64.sh
Open a terminal and type the following commands:
conda config --append channels conda-forge
conda config --set channel_priority strict
conda create -n qlsc612 -y python=3.9 flake8 ipython jupyter jupyterlab matplotlib nibabel nilearn numpy pandas scipy seaborn bokeh
conda activate qlsc612
- You will be following different instructions depending on your distro (Ubuntu, Debian, Fedora, CentOS). Make sure to follow the “Install using the repository” method!
- Once you’ve installed Docker make sure to follow the post-install instructions as well. You only need to do the “Manage Docker as a non-root user” and “Configure Docker to start on boot” steps.
- Open a new terminal and type
docker run hello-world
. A brief introductory message should be printed to the screen.