robintw / Py6S

A Python interface to the 6S Radiative Transfer Model
GNU Lesser General Public License v3.0
186 stars 105 forks source link

How use py6S in google colaboratory? problem "cannot find the sixs executable in $PATH or current directory" #105

Closed felipefariadesousa closed 11 months ago

felipefariadesousa commented 11 months ago

Hi Robin!

I am very excited to use py6S on google collaborative, but I am getting the following error "Error: cannot find the sixs executable in $PATH or current directory."

I installed using the pip install command

fnemina commented 11 months ago

Hello,

I had the same problem and had to manually copy the sixs executable and add it to the path. Here is how to do this

!pip install py6s
!apt install gfortran libgfortran5
!wget https://anaconda.org/conda-forge/sixs/1.1.3/download/linux-64/sixs-1.1.3-h2cc385e_2.tar.bz2
!tar -xvf sixs-1.1.3-h2cc385e_2.tar.bz2
!rm sixs-1.1.3-h2cc385e_2.tar.bz2
!chmod +x bin/sixs
!ln bin/sixs /usr/local/bin/sixs

just copy this code into a cell and run it, it will install py6s with pip, download the necessary libraries, get the sixs executable and copy it to the correct folder.

You can check and example here.

Hope this works for you, Fran

felipefariadesousa commented 11 months ago

Hello,

Thank you very much for taking your time to help me. I'm happy to say it's working perfectly now!

Thanks!