Category:Python

From Traxel Wiki
Revision as of 01:19, 13 September 2023 by RobertBushman (talk | contribs)
Jump to navigation Jump to search

buffering

Fix CLI buffering in Python with:

$ python -u foo.py | tee mylog.log

"-u" means unbuffered, or something

Virtual Environments

# Check Python version
python3 --version

# Check pip version
pip3 --version

# Install virtualenv
pip3 install virtualenv

# Navigate to your project directory
cd ~/my_project/

# Create virtual environment
python3 -m venv myenv

# Activate virtual environment
source myenv/bin/activate

# Now you can install packages
pip install <your-package>

# Deactivate when you're done
deactivate

Pages in category "Python"

The following 7 pages are in this category, out of 7 total.