Ioannis Giannakaras
Ioannis Giannakaras

Reputation: 41

Can I use an executable file in Google Colab?

I am trying to use a package (pershombox) in Colab, dependent on third party software tools in executable form that I need to upload myself.

Is this possible, and if so which operating system's version do I need to upload?

Upvotes: 4

Views: 4146

Answers (1)

JaonHax
JaonHax

Reputation: 346

You should be able to do it. Google Colaboratory uses a version of Ubuntu for its VMs, and you can run shell commands by placing a ! at the start of the line. As an example, I've just run cat /etc/os-release to display the OS info.

Screenshot of Google Colaboratory

So if you have a .deb file for the software you need, you can do this:

!chmod +x path_to_your_file.deb
!sudo dpkg -i path_to_your_file.deb

or if you instead have a link to the .deb file (usually faster, in my experience):

!wget https://link.to.file/file.deb
!chmod +x file.deb
!sudo dpkg -i file.deb

Upvotes: 1

Related Questions