config

reference:

installation

  • or

  • or

[!NOTE|label:references:]

environment in MacOS

pip.conf

pip.conf load priority

  • MacOS : /Library/Application Support/pip/pip.conf > ~/.config/pip/pip.conf > ~/.pip/pip.conf

  • user: ~/.pip/pip.conf & ~/.config/pip/pip.conf

  • global: /Library/Application Support/pip/pip.conf

  • list config:

    • details

  • upgrade all outdated modules

    • with exclude

  • naming

  • per-command section

  • boolean options

    • add

  • repeatable options

  • format: on multiple lines

  • macos

python libs

MacOS

  • global

  • local

    • example:

linux

references:

  • check particular lib

multiple versions

get current working version

  • or

upgrade particular modules

  • upgrade to previous version

install all older version modules

  • reference:

    • or

version change

change default python from 3.9 to 3.10

setup default python

modules re-installation

PYTHONPATH

extension

  • download

  • configure

python IDLE in MacOS Big Sur

IDLE quit unexpectedly

  • root cause

  • using https://www.python.org/ftp/python/3.9.1/python-3.9.1-macosx10.9.pkg

    idle in mac big sur

Python may not be configured for Tk

  • solution

######################################################################## 100.0% ==> Downloading https://ghcr.io/v2/homebrew/core/python-tk/3.10/blobs/sha256:6a937be1fd531589ef7f9b4d971cb91ee7549d99f7f1aaf97f0fc3c0911f1c5d ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:6a937be1fd531589ef7f9b4d971cb91ee7549d99f7f1aaf97f0fc3c0911f1c5d?s ######################################################################## 100.0% ==> Pouring python-tk@3.10--3.10.4.monterey.bottle.tar.gz ==> Caveats python-tk@3.10 is keg-only, which means it was not symlinked into /usr/local, because this is an alternate version of another formula.

==> Summary ☕️ 🐸 /usr/local/Cellar/python-tk@3.10/3.10.4: 5 files, 132.6KB ==> Running brew cleanup python-tk@3.10... Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP. Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew).

$ brew reinstall python@3.10 ... ...

pyvenv ps1

  • or using PROMPT_COMMAND

    full ps1 with pyenv and __git_ps1

init and setup

[!NOTE|label:references:]

PLATFORM
SHELL
HOW TO ACTIVATE

posix

bash/zsh

source <venv>/bin/activate

posix

fish

source <venv>/bin/activate.fish

posix

csh/tcsh

source <venv>/bin/activate.csh

posix

PowerShell

<venv>/Scripts/Activate.ps1

Windows

cmd.exe

<venv>\Scripts\activate.bat

Windows

PowerShell

<venv>\Scripts\Activate.ps1

install packages

[!NOTE|label:references:]

Last updated

Was this helpful?