Python
Python updated to 3.10
Fedora 35 updates the Python stack from Python 3.9 to Python 3.10, the newest major release of the Python programming language.
Information about the new features in Python 3.10 can be found at the Python website.
ໝາຍເຫດກ່ຽວກັບການຍ້າຍແພັກເກດ pip ທີ່ຕິດຕັ້ງໂດຍຜູ້ໃຊ້
When you upgrade from an earlier release to Fedora 35 the main Python interpreter version changes from 3.9 to 3.10. If you have any Python packages installed using pip, you must complete the following procedure to migrate them to the new version:
-
ຕິດຕັ້ງ Python ເວີຊັນຫຼັກກ່ອນໜ້ານີ້:
sudo dnf install python3.9 -
ຕິດຕັ້ງ
pipສຳລັບ Python ເວີຊັນຫຼັກກ່ອນໜ້ານີ້:python3.9 -m ensurepip --user -
ກວດເບິ່ງລາຍຊື່ແພັກເກດທີ່ຕິດຕັ້ງແລ້ວ:
python3.9 -m pip list -
ບັນທຶກລາຍຊື່ພ້ອມກັບເວີຊັນທີ່ເຈາະຈົງ:
python3.9 -m pip freeze > installed.txt -
ຕິດຕັ້ງແພັກເກດເຫຼົ່ານັ້ນສຳລັບເວີຊັນມາດຕະຖານໃນປັດຈຸບັນ:
python3 -m pip install --user -r installed.txt -
Uninstall user-installed packages for 3.9; this ensures proper removal of files in
~/.local/bin:python3.9 -m pip uninstall $(python3.9 -m pip list --user | cut -d" " -f1) -
ທາງເລືອກ, ລຶບໂຄງສ້າງໂຟນເດີທີ່ວ່າງເປົ່າໃນຕອນນີ້ອອກ:
rm -rf ~/.local/lib/python3.9/ -
ທາງເລືອກ, ຖອນ Python ເວີຊັນທີ່ບໍ່ຈຳເປັນອອກ:
sudo dnf remove python3.9
Additionally, if you have any pip packages installed using sudo, run the following commands before running the final step above which removes `python3.9`, or install it again temporarily:
-
ຕິດຕັ້ງ
pipສຳລັບ Python ເວີຊັນຫຼັກກ່ອນໜ້ານີ້ສຳລັບroot:sudo python3.9 -m ensurepip -
ກວດເບິ່ງແພັກເກດທີ່ຕິດຕັ້ງໃນລະບົບ:
sudo python3.9 -m pip list -
Uninstall installed packages for 3.9; this ensures proper removal of files in
/usr/local/bin:sudo python3.9 -m pip uninstall $(python3.9 -m pip list | cut -d" " -f1) -
ທາງເລືອກ, ລຶບໂຄງສ້າງໂຟນເດີທີ່ວ່າງເປົ່າໃນຕອນນີ້ອອກ:
sudo rm -rf /usr/local/lib*/python3.9/
|
ຖ້າທ່ານເຮັດຕາມຂັ້ນຕອນທຳອິດ, ແພັກເກດຕ່າງໆຈະຖືກຕິດຕັ້ງໄວ້ສຳລັບບັນຊີຜູ້ໃຊ້ຂອງທ່ານແລ້ວ, ເຊິ່ງເປັນວິທີທີ່ແນະນຳ. ຫຼີກເວັ້ນການໃຊ້ |
Python 3.5 is retired
The python3.5 package is no longer in Fedora Linux 35. Python 3.5 has been End-of-Life since September 2020 and was retained in previous versions of Fedora to enable developers to test software targeting Ubuntu 16.04 “Xenial Xerus” LTS and Debian 9 “Stretch” LTS. As these target platforms reach their End-of-Life, this package is no longer required. For more information, see the Changes page.
Want to help? Learn how to contribute to Fedora Docs ›