Pandas on gh for Rh8?

Hello everyone and team of Rh developers,

I searched among some topics to find any possible solution for installing pip packages on gh (Rh8 script component) but couldn’t find any updated ones.

Is there any updates? I’ve noticed that numPy and matplotlib are installed(I think built-in) but how is it possible to add other packages?

Thanks

1 Like

I was able to use pandas by adding it as requirement before importing it:

# r: pandas

import pandas
1 Like

Thank you for your answer.

How does it work?

Just # r: pandas? Don’t we need to install it through cmd?

In Rhino 8 when you use a Python 3 script that will do it for you.

But there is red one for me here. Can you explain a bit more specific? I have Rh8.

These are the results I have.

pandas error2

And there is another question that I have! Where is the files directory for pandas? I mean the location for envs or packages? So that I can load it from there.

The error logs should tell you what is going on.

This is what it says: AttributeError: partially initialized module ‘pandas’ has no attribute ‘_pandas_datetime_CAPI’ (most likely due to a circular import)

Oh, I tried to install it from cmd to “site-rhinoghpython” is there a duplicate that causing this problem?

I don’t know enough of the inner workings of the Python 3 integration to be able to tell. That is a question for @eirannejad

1 Like

This may resolve the issue:

import locale
locale.setlocale(locale.LC_ALL, 'en_US')
import pandas
3 Likes

Thank you very much it is completely loaded. :pray:

6 posts were split to a new topic: Loading and using MathLab Plots in Grasshopper with Python 3