Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Install from source:
- apt install libssl-dev libffi-dev zlib1g-dev
- wget https://www.python.org/ftp/python/3.12.3/Python-3.12.3.tgz
- tar xzf Python-3.12.3.tgz
- cd Python-3.12.3
- env CFLAGS='-march=native -mtune=native' ./configure --enable-optimizations --with-lto
- make -j
- make altinstall
- python3.12 -V
- # Install installer
- apt install python-pip
- apt install python3-pip
- # OR
- wget https://bootstrap.pypa.io/get-pip.py
- python get-pip.py
- # Install package
- pip install <package>
- # Reinstall package
- pip install --upgrade --force-reinstall <package>
- # View what installed
- pip list
- # View package info (dependensys)
- pip show <package>
- pip install pipdeptree
- pipdeptree
- # View updates
- pip list --outdated
- # or
- pip install pip-check
- pip-check
- # Update:
- pip install --upgrade <package>
- # Virtual environment creation:
- python3 -m venv ~/.local/pyvenv
- # View virtual env:
- echo $VIRTUAL_ENV
- # Venv upgrade:
- python3 -m venv --upgrade ENV_DIR
- # Use venv from script:
- #!/opt/mail-in/bin/.env/bin/python3.11
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement