In Google-colab weitere packages nach Installieren

  • 0 Antworten
  • Letztes Antwortdatum
say_hello

say_hello

Dauer-User
222
Hallo Community,
können denn bei Bedarf einfach beliebige weitere packages in colab via Terminal nachinstalliert werden?
Auch dann wenn man kein pro Account besitzt.?



Update. Hab noch einmal Recherche betrieben und bin wohl fündigw Geworden How do I install Python packages in Google's Colab?



You can use !setup.py install to do that.

Colab is just like a Jupyter notebook. Therefore, we can use the ! operator here to install any package in Colab. What ! actually does is, it tells the notebook cell that this line is not a Python code, its a command line script. So, to run any command line script in Colab, just add a ! preceding the line.

For example: !pip install tensorflow. This will treat that line (here pip install tensorflow) as a command prompt line and not some Python code. However, if you do this without adding the ! preceding the line, it'll throw up an error saying "invalid syntax".

But keep in mind that you'll have to upload the setup.py file to your drive before doing this (preferably into the same folder where your notebook is).
 
Zuletzt bearbeitet:

Ähnliche Themen

say_hello
Antworten
0
Aufrufe
324
say_hello
say_hello
say_hello
Antworten
0
Aufrufe
482
say_hello
say_hello
A
  • Andirod
Antworten
7
Aufrufe
1.113
Andirod
A
Zurück
Oben Unten