Skip to main content
Solved

Python with puodide


Forum|alt.badge.img+2

I am trying to install some python packages that do not appear to have a wheel which turns into a problem because , as far as I know, pyodide is not able to install packages without a wheel. Here is an example of an error I am receiving  - “Can't find a pure Python 3 wheel for 'psutil==5.9.5'.”-

How can I address this issue in Jupyter Notebook and streamlit? Is there a workaround? Is there a way to use a different kernel instead of pyodide?

I am not facing this issue with CDF functions. How does CDF functions environment differ from Jupyter Notebook and streamlit?

Best answer by Murad Sæter

Jypyter notebooks in CDF is running inside your browser and is based on pyodide. There is a subset of packages that works with pyodide. psutil seems like something wouldn’t work here.

There workaround is to install jupyter / python locally on your computer.

CDF functions runs in a normal python environment, so that’s different.

View original

Murad Sæter
Practitioner

Jypyter notebooks in CDF is running inside your browser and is based on pyodide. There is a subset of packages that works with pyodide. psutil seems like something wouldn’t work here.

There workaround is to install jupyter / python locally on your computer.

CDF functions runs in a normal python environment, so that’s different.


  • Seasoned Practitioner
  • October 24, 2023

Hi @Diana Chimnaz Johan, did the above help you?


Forum|alt.badge.img+2

Hello,

It helped to confirm the limitation of the jupyter notebook and streamlit since both use pyodide. I was wondering if there is a plan to lift that limitation? 

Thanks,

Diana


Murad Sæter
Practitioner

We don’t have any plans to deploy jupyter or streamlit outside pyodide in the Cognite platform. 

What are you trying to do that does not work in pyodide?


Dilini Fernando
Seasoned Practitioner
Forum|alt.badge.img+2

Hi @Diana Chimnaz Johan,

We are following up to see whether you're satisfied with the responses you've received.

Best regards,
Dilini  


Forum|alt.badge.img+2

Hi Dilni,

Yes, I got all the answers I needed.

Thanks,

Diana


APSHANKAR Sagar
Committed

@Murad Sæter 
sklearn, pytorch, tensorflow are all very well known data science libraries. None of them have a pure python wheel.

Unless I am wrong, you can’t use them in CDF Streamlit. Do you agree?

Neither does numba which is a prerequisite for stumpy which I am trying to use for time series segmentation.

It would be nice to have these packages work. For example, by letting users choose and operate inside docker containers like on DigitalOcean. Otherwise, many interesting things will have to be done outside of CDF.


Murad Sæter
Practitioner

You are right. There are limitations with pydiode, but we have currently no plans of deploying any server side notebook or streamlit functionality. If you need that you can use any cloud provider and access CDF using our SDKs.


Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings