Dedalus in Colab

552 views
Skip to first unread message

Ish Kaul

unread,
Jun 3, 2021, 3:13:35 AM6/3/21
to Dedalus Users
Hi All!

I was attempting to download dedalus in google Colab but it seems to not work. After multiple attempts the download process always fails when using pip install at the building wheels step like so:

Collecting dedalus Downloading https://files.pythonhosted.org/packages/a9/a9/676aab3727076de1b54a5465834eab64965e6bbc4af780274243554bd082/dedalus-2.2006.tar.gz (123kB) |████████████████████████████████| 133kB 6.9MB/s 
Installing build dependencies ... done 
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/local/lib/python3.7/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmphhtmvjot 
Check the logs for full command output.

 
One suggested method to overcome this was the following code in Colab:
!module purge
!module load fftw3/3.3.7-gcc
!module load python3/3.6.2
!module load mpi4py/3.0.0-py36-omp10.2
!module load hdf5/1.8.14

!export FFTW_PATH=$FFTW3_BASE
!export MPI_PATH=$OPENMPI_BASE

!pip3 install -v --no-binary :all: --user dedalus

But now this fails with the following error message:

WARNING: The project does not specify a build backend, and pip cannot fall back to setuptools without 'wheel'.

TypeError: expected str, bytes or os.PathLike object, not NoneType Getting requirements to build wheel ... error
Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp747m2ldv 
Check the logs for full command output. 
ERROR: Could not find a version that satisfies the requirement dedalus (from versions: 2.1810a1, 2.1810a2, 2.1810a3, 2.1810, 2.1905a1, 2.1905a2, 2.1905a3, 2.1905, 2.2006a1, 2.2006) 
ERROR: No matching distribution found for dedalus

This is a truncated version of the error message. In any case, is there a way to get dedalus working on Colab, and if so I would greatly appreciate help with the same.

Thank you,
Ish Kaul


Ashna Aggarwal

unread,
Jun 3, 2021, 11:56:38 AM6/3/21
to Dedalus Users
Hello Ish,

I am not very familiar with dedalus installation procedures, but Geoff Vasil is and wrote the script below to help my research group with a dedalus tutorial. 
Let me know if it helps,

-Ashna




## Check Dedalus isn't already installed
## Installation takes about 1-2 mins

try:
import dedalus.public as de
print("Dedalus already installed")
except:
print("Dedalus not installed yet. Let's do it.")

# Step 1: Install FFTW
!apt-get install libfftw3-dev
!apt-get install libfftw3-mpi-dev

# Step 2: Set paths for Dedalus installation
import os
os.environ['MPI_INCLUDE_PATH'] = "/usr/lib/x86_64-linux-gnu/openmpi/include"
os.environ['MPI_LIBRARY_PATH'] = "/usr/lib/x86_64-linux-gnu"
os.environ['FFTW_INCLUDE_PATH'] = "/usr/include"
os.environ['FFTW_LIBRARY_PATH'] = "/usr/lib/x86_64-linux-gnu"

# Step 3: Install Dedalus using pip
!pip3 install dedalus

# Step 4: Check Dedalus is importable
print()
print()
try:
import dedalus.public as de
print("Dedalus successfully installed :)")
except:
print("Error installing Dedalus :(")
raise

Ashna Aggarwal

unread,
Jun 3, 2021, 11:57:19 AM6/3/21
to Dedalus Users
Sorry and I forgot to mention that this script was for a Google Colab tutorial!

Ish Kaul

unread,
Jun 3, 2021, 8:40:54 PM6/3/21
to Dedalus Users
Thanks so much for the help Ashna! The installation script you sent worked properly!

Thanks,
Ish

Reply all
Reply to author
Forward
0 new messages