Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

2.3K
Views
¿Es posible usar Python 3.10 en Google Colab?

Me gustaría usar la función de coincidencia de patrones estructurales de Python 3.10 en Google Colab para usar los comandos

 !sudo apt-get install python3.10 !sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 !sudo update-alternatives --set python3 /usr/bin/python3.10

Pude hacer !python --version de salida 3.10.0, pero la print(sys.version) aún genera 3.7.12 en celdas de código y, por lo tanto, la declaración de casos coincidentes genera SyntaxError

 number = 1 match number: case 0: print("Error") case _: print(number)

¿Hay alguna manera de hacer funcionar esto?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Puedes probar estos comandos:

 !update-alternatives --install /usr/bin/python python /usr/bin/python3.10

entonces

 !update-alternatives --list python

Esto debe mostrar su versión de Python descargada.

Después,

 !sudo update-alternatives --config python ## !Set python3.10 as default.

Por fin,

 !sudo update-alternatives --set python /usr/bin/python3.10

luego verifique su versión predeterminada de Python en colab.

 !python3 --version
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!