Python

From Braindump
Revision as of 12:30, 31 July 2023 by Jan (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
which python3
/usr/bin/python3
ls -la /usr/bin/python3
ldd /usr/bin/python3.10
       linux-vdso.so.1 (0x00007ffd137b7000)
       libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7b3f900000)
       libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f7b3f8cf000)
       libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f7b3f8b3000)
       libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7b3f68b000)
       /lib64/ld-linux-x86-64.so.2 (0x00007f7b3ffe3000)
/usr/bin/python3.10 -V
Python 3.10.6
/usr/bin/python3.10 -VV
Python 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0]
python3 -c "import sys; print('\n'.join(sys.path))"
/usr/lib/python310.zip
/usr/lib/python3.10
/usr/lib/python3.10/lib-dynload
/usr/local/lib/python3.10/dist-packages
/usr/lib/python3/dist-packages
/usr/lib/python3.10/dist-packages
find /usr/lib/python3.10/ -name shutil*
/usr/lib/python3.10/shutil.py
/usr/lib/python3.10/__pycache__/shutil.cpython-310.pyc
python3-setuptools

PIP

which pip
~/.local/lib/python3.8/site-packages
python3 -m pip list
python3 -m pip freeze > requirements.txt
python3 -m pip install -r requirements.txt --upgrade

python -m pip install --upgrade pip
pip install numpy
pip install -U `pip list --outdated | awk 'NR>2 {print $1}'`
pip freeze --local | grep -v '^\-e' | cut -d = -f 1  | xargs -n1 pip install -U
pip --disable-pip-version-check list --outdated --format=json | python -c "import json, sys; print('\n'.join([x['name'] for x in json.load(sys.stdin)]))"
venv
pyinstaller --onefile --noconfirm --noconsole --clean --log-level=WARN -p . --strip hello.py