Hello all!
Deleted all the of the Python prefixes from my lib and .local lib!!!
/lib/pypy/
/lib/python2.7/
/lib/python3/
/lib/python3.9/
/home/myusername/.local/lib/python3.9/
Is it possible to reinstall this software? If not, what would you do in this situation?
Please advise, and thank you very much!!
Re: Python Lib Prefixes
First, I need to take a deep breath 

Re: Python Lib Prefixes
What you show is the installation of multiple versions of python. Is there anything actually wrong? Why do you need/want to reisntall?
Re: Python Lib Prefixes
This should install the supported Python 3 Version on Debian.
Code: Select all
sudo apt-get update
sudo apt-get install python3
Re: Python Lib Prefixes
But not any python modules that OP may have installed manually.DeaD_EyE wrote: ↑Thu Jun 23, 2022 10:14 amThis should install the supported Python 3 Version on Debian.
Code: Select all
sudo apt-get update sudo apt-get install python3
Re: Python Lib Prefixes
You can get a list of all as installed marked packages:
To replace the line endings (there is maybe a better solution):
Output on my RP0W (it 's not a fresh install):
Code: Select all
dpkg -l | egrep 'ii\s+python3-' | awk '{print $2}'
Code: Select all
dpkg -l | egrep 'ii\s+python3-' | awk '{print $2}' | tr -s "\n" " "
Then you should be able to use apt-get to install this as installed marked packages.python3-apt python3-astroid python3-asttokens python3-automationhat python3-backcall python3-blinker python3-blinkt python3-bs4 python3-buttonshim python3-cairo:armhf python3-cap1xxx python3-certifi python3-cffi-backend:armhf python3-chardet python3-click python3-colorama python3-colorzero python3-cryptography python3-cups:armhf python3-cupshelpers python3-dbus python3-debconf python3-decorator python3-dev python3-distro python3-distutils python3-docutils python3-drumhat python3-envirophat python3-explorerhat python3-flask python3-fourletterphat python3-gi python3-gi-cairo python3-gpiozero python3-html5lib python3-idna python3-ipython python3-ipython-genutils python3-isort python3-itsdangerous python3-jedi python3-jinja2 python3-jwt python3-lazy-object-proxy python3-ldb python3-lib2to3 python3-libgpiod:armhf python3-logilab-common python3-lxml:armhf python3-markupsafe python3-mccabe python3-microdotphat python3-minimal python3-mote python3-motephat python3-mypy python3-mypy-extensions python3-numpy python3-oauthlib python3-olefile python3-openssl python3-pantilthat python3-parso python3-pexpect python3-pgzero python3-phatbeat python3-pianohat python3-picamera python3-pickleshare python3-piglow python3-pigpio python3-pil:armhf python3-pip python3-pkg-resources python3-prompt-toolkit python3-psutil python3-ptyprocess python3-pygame python3-pygments python3-pyinotify python3-rainbowhat python3-renderpm:armhf python3-reportlab python3-reportlab-accel:armhf python3-requests python3-requests-oauthlib python3-responses python3-roman python3-rpi.gpio python3-rtimulib python3-scrollphat python3-scrollphathd python3-send2trash python3-sense-hat python3-serial python3-setuptools python3-simplejson python3-six python3-skywriter python3-smbc python3-smbus:armhf python3-sn3218 python3-soupsieve python3-spidev python3-talloc:armhf python3-tk:armhf python3-toml python3-touchphat python3-traitlets python3-twython python3-typed-ast python3-typing-extensions python3-unicornhathd python3-urllib3 python3-venv python3-wcwidth python3-webencodings python3-werkzeug python3-wheel python3-wrapt
Re: Python Lib Prefixes
That's pretty much what I would have used (maybe not awk, as I tend not to use that). The first part of your line could be changed to thisDeaD_EyE wrote: ↑Fri Jun 24, 2022 8:47 amYou can get a list of all as installed marked packages:To replace the line endings (there is maybe a better solution):Code: Select all
dpkg -l | egrep 'ii\s+python3-' | awk '{print $2}'
Code: Select all
dpkg -l | egrep 'ii\s+python3-' | awk '{print $2}' | tr -s "\n" " "
Code: Select all
dpkg -l 'python3*' | grep '^ii'
Code: Select all
dpkg -l '*python3*'
As the packages are already marked as installed you'd need to use the reinstall option.Then you should be able to use apt-get to install this as installed marked packages.
This should do the trick
Code: Select all
sudo apt reinstall $( dpkg -l '*python3*' | grep '^ii' | awk '{print $2}' )
Unreadable squiggle