Development Environment


To tidy up my work, several folders are created in my Documents folder, including data docs outputs projects. It is just to make a clear file structure.

C/C++

My Ubuntu 16.04 system has installed GCC already. But it is still worthy to check by sudo apt install g++.

#include <iostream>
using namespace std;

int main() {
    cout << "Hello World\nHi Hi\n";
    return 0;
}
    

Then run,


g++ firstScript.cpp -o firstScript
./firstScript #this is executable
    

Microsoft Visual Studio Code

Click to this link .deb package (64-bit). If it does not install automatically, just run the following command line,


sudo apt install ./code_1.51.1-xxxxxxxx_amd64.deb
    

To test the installation, just command code. The VSC window should show up.

Install programming language extensions using Ctrl+Shift+X. For example, C#.

.NET framework


wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update; \
  sudo apt-get install -y apt-transport-https && \
  sudo apt-get update && \
  sudo apt-get install -y dotnet-sdk-5.0
sudo apt-get update; \
  sudo apt-get install -y apt-transport-https && \
  sudo apt-get update && \
  sudo apt-get install -y aspnetcore-runtime-5.0
dotnet --version
    

Anaconda and Python

It is convenient to install python via Anaconda. One of the concerns I often have is that, whether or not tensorflow and pytorch can communicate with my Graphic card in the laptop. We also have to install some packages manually.

Steps

  1. Download the Anaconda installer for Linux. Does not matter if it comes with Python 3.6, 3.7 or 3.8.
  2. Bash the .sh script. Usually you downloaded it in your Downloads folder.
    
    bash ~/Downloads/Anacondaxxxxxx.sh
        
    And type yes and click enter for everything to go.
Sometimes you have python2.7 and python3.5 preinstalled. You can just use them via python2 or python3. So now you should install your packages by pip or pip3.

Some common packages are,

numpy pandas opencv-python nltk Flask virtualenv tensorflow torch torchvision

Please be cautious about tensorflow and pytorch gpu installation. It requires very specific version of cuda and gpu driver,etc.

Matlab

  1. Download the installer zip folder, and unzip it in an empty folder.
  2. 
    mkdir matlab
    unzip matlab_R2021a_glnxa64.zip -d matlab
    cd matlab
        
  3. Run the installer,
  4. 
    sudo ./install
        
  5. Install matlab-support package,
  6. 
    mkdir -p MATLAB/R2021a # inside matlab folder
    sudo apt-get install matlab-support # YES - Rename GCC
        
  7. Allow permission,
  8. 
    sudo chown meme -R ~/.matlab # sudo chown username -R ~/.matlab
        
  9. Then you can start the matlab by,
  10. 
    matlab
        

References


  1. How to install G++ the C++ compiler on Ubuntu 18.04
  2. How to install Anaconda on Ubuntu 16.04
  3. Tensorflow gpu installation
  4. Start Locally | PyTorch
  5. 8 Essential Vim Editor Navigation Fundamentals
  6. Visual Studio Code on Linux (Linux is not a cancer :))
  7. Install the .NET SDK or the .NET Runtime on Ubuntu
  8. ubuntu documentation -- MATLAB
  9. MATLAB Answers -- start matlab from desktop on ubuntu