Importing from .pyx file in google colab

Solution for Importing from .pyx file in google colab
is Given Below:

I am trying to import from a .pyx file in google colab but I get the error: ModuleNotFoundError: No module named 'filename'

My current code is:

from google.colab import drive
import sys
sys.path.append('/content/drive/My Drive/desiredPath')
from desiredModule import desiredClass

Any help would greatly be appreciated!

You cannot directly import pyx files, they must be compiled using Cython.

See the cython docs on how to build a cython-based project.