Uyifaka njani inguqulelo yamva nje yePython ku-Ubuntu kunye neDebian?

Uyifaka njani inguqulelo yamva nje yePython ku-Ubuntu kunye neDebian?

Uyifaka njani inguqulelo yamva nje yePython ku-Ubuntu kunye neDebian?

Njengoko sele isaziwa ngabasebenzisi abaninzi betekhnoloji yeenkqubo ezisebenzayo nezivulekileyo ezisekwe kwi-GNU/Linux, oko kukuthi, Ukuhanjiswa kweLinux okunje Ubuntu, Debian, Arch, Red Hat, SUSE kunye nezinye ezininzi; phantse zonke ziza ngokungagqibekanga kunye nenguqulelo engeyoyamva kunye nezinzileyo yePython efakiweyo. Kwaye ngokuqinisekileyo, oku kaninzi akubonisi nayiphi na ingxaki okanye umda we-ofisi okanye umsebenzisi wolawulo ekhaya, esikolweni okanye eofisini.

Kodwa, kubasebenzisi betekhnoloji abaphakathi okanye abaphambili, abanje ngabaPhuhlisi, abaLawuli beNkqubo kunye nabaSebenzi, okanye ukuzifundisa itekhnoloji yokufuna ukwazi kuvavanyo oluqhubekayo kunye nokuvavanywa kwezicelo kunye neenkqubo, oku kunokubonisa iingxaki ezithile kunye nemida. Kwaye nangona, amaxesha amaninzi, Ezinye ze-GNU/Linux Distros ziza nezinye, iinguqulelo zangoku ngakumbi zePython kwiindawo zabo zokugcina. ezifakwe ngokungagqibekanga, phantse azinikezeli ngoguqulelo oluzinzileyo lwamva nje kwaye nangaphantsi, enye kwisigaba sophuhliso. Ke ngoko, ukuba nabani na ufuna ukusebenzisa ezinye zezi nguqulelo zikhankanywe ngasentla, kufuneka abhenele kwezinye iindlela. Kwaye ngenxa yesi sizathu, namhlanje siza kukubonisa ngokufutshane amanyathelo ekufuneka uwalandele ngeendlela ezimbini ezizezinye zokufezekisa le njongo. Oko kukuthi, ukwazi njani «faka inguqulelo yamva nje yePython ku-Ubuntu kunye neDebian », okanye ezinye izinto eziphuma kuzo.

malunga nokufaka i-python 3.9

Kodwa, ngaphambi kokuba uqalise olu papasho ngesi sifundo siluncedo nesinomdla sokufikelela «faka inguqulelo yamva nje yePython ku-Ubuntu kunye neDebian », sicebisa ukuba uphonononge a Iposi elidlulileyo elidibeneyo Ngesihloko sePython, ekupheleni kokufunda oku:

malunga nokufaka i-python 3.9
Inqaku elidibeneyo:
IPython 3.9, uyifaka njani le nguqulo kwi-Ubuntu 20.04

Isifundo sokufaka iPython kwi-Ubuntu kunye neDebian: Iindlela ezizezinye

Isifundo sokufaka iPython kwi-Ubuntu kunye neDebian: Iindlela ezizezinye

Iindlela zokufaka inguqulelo yamva nje yePython kwi-Ubuntu kunye neDebian

Ukufakela nge-Deadsnakes PPA Repository

El Iqela Deadsnakes PPA Repository ubonakalise, ixesha elide, ukuba a umthengisi othembekileyo iipakethe ezahlukeneyo iinguqulelo zepython for Ubuntu, I-Debian kunye ne-Distros ethathwe kubo. Kwaye ukuyisebenzisa kwaye ufake ezinye iinguqulelo zePython, amanyathelo ekufuneka uwalandele ngoku alandelayo:

  • Vula i-terminal Emulator ku-Ubuntu okanye kwi-Derived
  • Yenza le miyalelo ilandelayo:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.13

Ukuba kuyimfuneko, ungafaka kwakhona inguqulelo epheleleyo ngokubuyisela umyalelo wokugqibela ngokulandelayo:

sudo apt-get install python3.13-full

Ngelixa, ukuba i-Debian Distro okanye i-derivative yayo isetyenzisiwe, into eyongezelelweyo yokwenza iya kuba hlela ifayile "yemithombo.list". ifunwa ngalo myalelo ulandelayo:

sudo nano /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-$VersionDebianDetectada.list

Emva koko, tshintsha igama elithi "bullseye" okanye "bookworm" okanye naliphi na elinye igama elihambelana neDebian kunye neDerivatives ngamagama athi "jammy" okanye "focal" ahambelana noBuntu. Kwaye ke fumana lo mgca wogcino ulandelayo (umthombo wesoftware) njengesiphumo:

deb https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu/ jammy main

Kwaye ke, qhubeka nokuhlaziya uluhlu lwepakethe kwakhona kunye ne faka i-python version 3, eyayifuneka.

Ufakelo ngokuhlanganiswa kwePython ukusuka kwiRepository esemthethweni

Ufakelo ngokuhlanganiswa kwePython ukusuka kwiRepository esemthethweni

Oku kuhlala kuyindlela entsonkothileyo kwaye ende, kodwa ikhuselekile kwaye ithembekile, kuba iyinyani khuphela iifayile zomthombo wePython kwiNdawo esemthethweni ukuqokelela ngokuthe ngqo kwikhompyuter yethu. Kwaye ukwenza ukusetyenziswa kwayo kwaye lawula ukufaka ezinye iinguqulelo zePython, amanyathelo ekufuneka uwalandele ngoku alandelayo:

Amanyathelo angaphambili: ukufakwa kweepakethe ezibalulekileyo kunye namathala eencwadi
sudo apt install wget build-essential
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
Amanyathelo aphambili: Ukuhlanganiswa kwePython
cd /tmp/
wget https://www.python.org/ftp/python/3.13.0/Python-3.13.0a3.tar.xz
tar -xf Python-3.13.0a3.tar.xz
cd Python-3.13.0a3/
./configure #Opcional en caso de ser necesario u error: --enable-optimizations
make -j2 #Reemplace el número por otro para indicar la cantidad de núcleos de CPU asignados a la tarea.
sudo make install #Preferiblemente con el parámetro altinstall para una instalación en paralelo.

Ukuba yonke into ihambe kakuhle ukuza kuthi ga kweli nqanaba, oko kukuthi, inguqulelo ekhutshelweyo ithe yaqulunqwa ngempumelelo, konke okushiyekileyo zama ukuhlohla inguqulelo entsha kunye nofakelo nokusetyenziswa kwe Iiphakheji zePython ngokusebenzisa "pip" umphathi. Nantoni na enokwenziwa kusetyenziswa le miyalelo ilandelayo:

python3.13 --version #Para chequear la versión nueva instalada.
python3 --version #Para chequear la versión previa instalada.
python3 -m pip --version #Para chequear la versión actual del Gestor PIP en la versión previa instalada de Python.
python3.13 -m pip --version #Para chequear la versión actual del Gestor PIP en la nueva versión instalada de Python.
python3.13 -m pip install --upgrade pip setuptools wheel #Instalación y actualización de paquetes Python esenciales.
sudo pip3.13 install --upgrade pip #Actualización a la última versión disponible del Gestor PIP.
sudo pip3.13 install speedtest-cli #Instalación del paquete Python SpeedTest CLI instalado con el Gestor PIP.
speedtest-cli #Ejecución del paquete Python SpeedTest CLI instalado con el Gestor PIP.
pyenv
Inqaku elidibeneyo:
Pyenv: Faka iinguqulelo ezininzi zePython kwinkqubo yakho

Isishwankathelo 2023 - 2024

Isishwankathelo

Ngamafutshane, ukuba ungomnye wabo Itekhnoloji, abasebenzisi abaphakathi okanye abaphambili (Dev, DevOps, SysAdmin, HelpDesk) okanye itekhnoloji enomdla yokuzifundisa itekhnoloji yasimahla kunye nevulekileyo ngonyaka ka-2024, siyathemba ukuba esi sifundo sisebenzayo nesiluncedo malunga nendlela. «faka nayiphi na inguqulelo yamva nje yePython ku-Ubuntu kunye neDebian » ikuvumela ukuba usombulule nayiphi na imfuneko kungakhathaliseki ukuba inguqu endala kunye nezinzile okanye inguqu yangoku kunye nokuphuhlisa. Ukongeza, ukuba uyazi nayiphi na enye indlela esebenzayo ngakumbi, siyakumema ukuba uyikhankanye kwaye uyichaze ngokufutshane kwizimvo zophononongo, uvavanyo kunye nolonwabo loluntu lwethu lonke lweLinuxera IT.

Okokugqibela, khumbula ukwabelana nabanye ngesi sithuba siluncedo nesimnandi, kwaye ndwendwela ekuqaleni kwethu «webhsayithi» ngeSpanish okanye ezinye iilwimi (ukongeza iileta ezi-2 ekupheleni kwe-URL, umzekelo: ar, de, en, fr, ja, pt kunye no-ru, phakathi kwezinye ezininzi). Ukongeza, siyakumema ukuba ujoyine yethu Ijelo leTelegram elisemthethweni ukufunda kunye nokwabelana ngeendaba ezininzi, izikhokelo kunye nezifundo ezivela kwiwebhusayithi yethu. Kwaye kwakhona, okulandelayo Enye indlela yeTelegram ukufunda ngakumbi malunga neLinuxverse ngokubanzi.


Shiya uluvo lwakho

Idilesi yakho ye email aziyi kupapashwa. ezidingekayo ziphawulwe *

*

*

  1. Uxanduva lwedatha: UMiguel Ángel Gatón
  2. Injongo yedatha: Ulawulo lwe-SPAM, ulawulo lwezimvo.
  3. Umthetho: Imvume yakho
  4. Unxibelelwano lwedatha: Idatha ayizukuhanjiswa kubantu besithathu ngaphandle koxanduva lomthetho.
  5. Ukugcinwa kweenkcukacha
  6. Amalungelo: Ngalo naliphi na ixesha unganciphisa, uphinde uphinde ucime ulwazi lwakho.