Yadda ake shigar da kowane nau'in Python 3?

Yadda ake shigar da kowane nau'in Python 3?

Yadda ake shigar da kowane nau'in Python 3?

A watan da ya gabata, na kasance kamar yadda na saba gwada wasu aikace-aikace kuma daya daga cikinsu shine Wasan Kyauta. Wannan app shine ainihin a Python shirin que zazzage fakitin wasan wajibi bisa ga GNU / Linux rarraba cewa muna da. Kuma guda, yana da duka a Interminal Interface (CLI) kamar yadda Desktop (GUI).

Don shari'ar CLI, yana aiki koyaushe a gare ni tare da kunshin Python (3.9 version) na halin yanzu Ci gaba da MilagrOS dangane da MX Linux Distro. Koyaya, haɗin GUI ɗin sa, duka an haɗa su kuma a cikin tsari  ".Arewa" amfani ko bukata Fakitin tushen Python 3.10 ko mafi girma. Saboda haka, dole ne in yi amfani da dabara mai matukar amfani kuma mai amfani, don "shigar da manyan nau'ikan Python" cewa yau zan raba muku.

Python

Python babban yaren shirye-shirye ne da aka fassara wanda falsafarsa ta jaddada iya karanta lambar sa.

Kuma, kafin ka fara karanta wannan post game da yiwuwar samun damar "shigar da manyan nau'ikan Python", za mu bar wasu hanyoyin zuwa abubuwan da suka shafi baya don karantawa:

Python
Labari mai dangantaka:
Python 3.11 ya zo tare da haɓaka aiki, sake fasalin caching da ƙari
Haɓaka GNU/Linux na ku: Debian don haɓaka ƙa'idodi
Labari mai dangantaka:
Haɓaka GNU/Linux na ku: Debian don haɓaka ƙa'idodi
Sanya kowane nau'in Python 3: Amfani da ma'ajin PPA

Sanya kowane nau'in Python 3: Amfani da ma'ajin PPA

Sanya kowane nau'in Python 3: Amfani da ma'ajin PPA

Shin yana da kyau a yi amfani da ma'ajin PPA?

Domin, a Ma'ajiyar PPA (Taskar Kunshin Mutum) ne mai ma'adana (wato) na software ma'aikata sun shiga cikin Launchpad, Dole ne a ko da yaushe a kiyaye cewa ba daga wani wanda ba a sani ba gaba ɗaya, ko daga wani maras tabbas ko marar amana. Saboda haka, sai dai idan wani ma'ajin PPA ba daga sanannen ƙungiya ko masu haɓakawa ba ne, yana da kyau a guji sarrafa su don guje wa ƙarewa da software mara tsaro, duk da haka kyauta da buɗewa yana iya kasancewa.

A cikin yanayin Ma'ajiyar Ma'aunin Macizai PPA, ya nuna, a tsawon lokaci, ya zama a abin dogara maroki na fakiti na daban-daban nau'ikan Python para Ubuntu, da Distros da aka samo daga gare ta, kuma masu dacewa da Debian GNU / Linux.

Duk da haka, kuma kamar yadda ya ce, lokacin amfani da shi, ya kamata a yi la'akari da gargaɗin mai zuwa:

"Disclaimer: Babu tabbacin sabuntawa akan lokaci idan akwai tsaro ko wasu batutuwa. Idan kana son amfani da su a cikin amintacce ko wani yanayi (misali, akan uwar garken samarwa), kuna yin haka cikin haɗarin ku.". Ƙungiyar macizai

A ƙarshe, a halin yanzu da kuma a hukumance, yana ba da samuwan nau'ikan nau'ikan masu zuwa:

  • Ubuntu 18.04 (bionic): Python 2.3 da 2.6; da kuma Python 3.1, 3.5, 3.7 da 3.11.
  • Ubuntu 20.04 (mayar da hankali): Python 3.5, 3.7, 3.9 da 3.11.
  • Ubuntu 22.04 (jammy): Python 3.7, 3.9 da 3.11.

Duk da haka, a yau za ka iya riga samun samuwa na Python 3.12.

Matakai don shigar da kowane nau'in Python 3

Matakai don shigar da kowane nau'in Python 3

Yin la'akari da duk abubuwan da ke sama, ko akan Ubuntu, Debian ko kowane Distro/Respin da aka samu daga gare su, hanyar shigar da amfani da Ma'ajiyar Ma'aunin Macizai PPA shine mai zuwa:

  • Bude Emulator Terminal
  • Gudanar da umarni masu zuwa:
sudo add-apt-repository ppa:deadsnakes/ppa sudo dace-samun sabuntawa
  • Da zarar an sabunta jerin fakitin cikin nasara, yanzu za ku iya gudanar da shigar da nau'ikan nau'ikan Python. Misali, don shigar da Python 3.12 ana iya aiwatar da shi, ta kowace hanya guda biyu masu zuwa, don ƙarami ko cikakken shigarwa:
sudo dace-samun shigar python3.12 sudo dace-samun shigar python3.12-cikakken

A cikin yanayi na musamman, lokacin amfani da Respin da aka ambata a sama a farkon, na sami shirya fayil ɗin Source.list ake buƙata tare da umarni mai zuwa:

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

Sannan, canza kalmar "bullseye" ko "bookworm" ko kowace kalma da ta dace da Debian da Deivatives tare da kalmomin "jammy" ko "focal" daidai da Ubuntu. Don haka sami layin ma'ajin ajiya mai zuwa (tushen software) a sakamakon haka:

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

Kuma ci gaba da sabunta jerin fakitin sake, don gamawa da shigar Python version 3, wanda nake bukata.

Zagaye: Banner post 2021

Tsaya

A takaice, muna fatan wannan kadan dabara ko magani, zama mai amfani sosai, duka zuwa masu amfani da masu haɓaka softwarea matsayin Masu amfani da aikace-aikacen tushen Python, da ake bukata "shigar da manyan nau'ikan Python" ga wadanda aka saba samu a cikin nasu GNU/Linux distros dangane da Ubuntu/Debian. Kuma idan wani ya sani ko yana da wani wani madadin amfani ko kuna so ku ba da gudummawa shawara, shawarwari ko gyara ga abin da aka bayar a nan, kuna maraba da yin haka ta hanyar sharhi.

Kuma a, kun ji daɗin wannan littafin, kada ku daina yin tsokaci game da shi da kuma raba shi ga wasu. Hakanan, ku tuna ziyartar mu «shafin gida» don bincika ƙarin labarai, da shiga tashar tashar mu ta hukuma Telegram na DesdeLinux, Yamma rukuni don ƙarin bayani kan batun yau.


Bar tsokaci

Your email address ba za a buga. Bukata filayen suna alama da *

*

*

  1. Wanda ke da alhakin bayanan: Miguel Ángel Gatón
  2. Manufar bayanan: Sarrafa SPAM, sarrafa sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.