The Founder’s Guide:
How to Install the Python Environment for AI and Machine Learning on Linux
The condensed tutorial with copy and paste code and screenshots
“The expanded version of this article uses concise explanations to help you learn what’s happening 💡”
Open Terminal:
- Click “Activities” in the top-left corner
- Enter “Terminal” into the search bar
- Click “Terminal”
Open the Home Directory:
- Copy the command from below these instructions
- Paste the command into PowerShell
- Press “Enter”
cd $HOME/Desktop/
Set the Default Version for the Computer:
- Copy the command from below these instructions
- Paste the command into Terminal
- Press “Return”
Python 3.5:
pyenv global 3.5.4Python 3.6:
pyenv global 3.6.8Python 3.7:
pyenv global 3.7.9Python 3.8:
pyenv global 3.8.6Python 3.9:
pyenv global 3.9.0
Create the Virtual Environment:
- Find the Python version from below these instructions
- Copy the provided command
- Paste the command into Terminal
- Press “Return”
Python 3.5:
python -m venv venv35Python 3.6:
python -m venv venv36Python 3.7:
python -m venv venv37Python 3.8:
python -m venv venv38Python 3.9:
python -m venv venv39
Activate the Virtual Environment:
- Find the Python version from below these instructions
- Copy the provided command
- Paste the command into Terminal
- Press “Return”
Python 3.5:
source venv35/bin/activatePython 3.6:
source venv36/bin/activatePython 3.7:
source venv37/bin/activatePython 3.8:
source venv38/bin/activatePython 3.9:
source venv39/bin/activate
Install NumPy:
- Copy the command from below these instructions
- Paste the command into PowerShell
- Press “Enter”
python -m pip install numpy
Install Pandas:
- Copy the command from below these instructions
- Paste the command into PowerShell
- Press “Enter”
python -m pip install pandas
Install SciPy:
- Copy the command from below these instructions
- Paste the command into PowerShell
- Press “Enter”
python -m pip install scipy
Install Pillow:
- Copy the command from below these instructions
- Paste the command into PowerShell
- Press “Enter”
python -m pip install pillow
Install Matplotlib:
- Copy the command from below these instructions
- Paste the command into PowerShell
- Press “Enter”
python -m pip install matplotlib
Install OpenCV:
- Copy the command from below these instructions
- Paste the command into PowerShell
- Press “Enter”
python -m pip install opencv-python
Install Scikit-Learn:
- Copy the command from below these instructions
- Paste the command into PowerShell
- Press “Enter”
python -m pip install scikit-learn
Install Keras:
- Copy the command from below these instructions
- Paste the command into PowerShell
- Press “Enter”
python -m pip install keras
Install TensorFlow:
- Copy the command from below these instructions
- Paste the command into PowerShell
- Press “Enter”
python -m pip install tensorflow tensorflow-gpu
Install PyTorch:
- Copy the command from below these instructions
- Paste the command into PowerShell
- Press “Enter”
CUDA 11.0:
python -m pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio===0.7.2 -f https://download.pytorch.org/whl/torch_stable.htmlCUDA 10.2:
python -m pip install torch torchvisionCPU:
python -m pip install torch==1.7.1+cpu torchvision==0.8.2+cpu torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
Install MxNet:
- Copy the command from below these instructions
- Paste the command into PowerShell
- Press “Enter”
CUDA 10.2:
python -m pip install mxnet-cu102 -f https://dist.mxnet.io/pythonCPU:
python -m pip install mxnet
“Hopefully, this article helped you get the 👯♀️🏆👯♀️, remember to subscribe to get more content 🏅”
Next Steps:
This article is part of a mini-series that helps readers set up everything they need to start learning about artificial intelligence, machine learning, deep learning, and or data science. It includes articles that contain instructions with copy and paste code and screenshots to help readers get the outcome as soon as possible. It also includes articles that contain instructions with explanations and screenshots to help readers learn about what’s happening.
Linux:
01. Install and Manage Multiple Python Versions
02. Install the NVIDIA CUDA Driver, Toolkit, cuDNN, and TensorRT
03. Install the Jupyter Notebook Server
04. Install Virtual Environments in Jupyter Notebook
05. Install the Python Environment for AI and Machine LearningWSL2:
01. Install Windows Subsystem for Linux 2
02. Install and Manage Multiple Python Versions
03. Install the NVIDIA CUDA Driver, Toolkit, cuDNN, and TensorRT
04. Install the Jupyter Notebook Server
05. Install Virtual Environments in Jupyter Notebook
06. Install the Python Environment for AI and Machine Learning
07. Install Ubuntu Desktop With a Graphical User Interface (Bonus)Windows 10:
01. Install and Manage Multiple Python Versions
02. Install the NVIDIA CUDA Driver, Toolkit, cuDNN, and TensorRT
03. Install the Jupyter Notebook Server
04. Install Virtual Environments in Jupyter Notebook
05. Install the Python Environment for AI and Machine LearningMac:
01. Install and Manage Multiple Python Versions
02. Install the Jupyter Notebook Server
03. Install Virtual Environments in Jupyter Notebook
04. Install the Python Environment for AI and Machine Learning