All Guides
Python Setup and pip
Install the Python programming language and pip package manager.
Beginner10 min
Setup Steps
1. Install Python 3 (usually pre-installed on Ubuntu):
sudo apt update
sudo apt install python3 python3-pip python3-venv -y2. Check versions:
python3 --version
pip3 --version3. Create a virtual environment:
python3 -m venv myenv
source myenv/bin/activate4. Install packages:
pip install requests flask numpy pandas5. Save packages to a file:
pip freeze > requirements.txt6. Install packages from file:
pip install -r requirements.txt7. Manage different Python versions with pyenv:
curl https://pyenv.run | bash8. Add to .bashrc:
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"9. Install a new version:
pyenv install 3.12.3
pyenv global 3.12.3Related Guides
Jupyter Notebook Setup
Install Jupyter Notebook and use the interactive Python development environment.
TensorFlow Setup
Install the Google TensorFlow machine learning library and create your first model.
PyTorch Setup
Install the Meta PyTorch deep learning library and learn basic usage.
Conda/Miniconda Setup
Install the Miniconda package and environment manager. Isolate Python environments.