I have used pip install pandas already
numpy can run, but what happen to pandas?
Hi Wilson,
There was a similar issue posted about this the other day.
To be clear, you are referring to GH1 correct? not Grasshopper 2.0
Have the same issue here, locale is set and Path has been set but still doesnāt work
Have found that Pandas will import if I:
- pip install directly using āpython.exe -m pip install pandasā for the rhinocode python.exe file
- delete the folder in site-envs and restart Rhino 8
But then if I close Rhino 8 and open it again, I get the same issue as shown above again.
I have the same issue and I have tried all ā¦ any updates on how to solve it?
Does setting locale before importing pandas help? BTW the Python 3 runtime attempts to do this when launching so itād be great if you can test:
import locale
locale.setlocale(locale.LC_ALL, 'en_US')
import pandas
Also run RhinoCodeLogs
after launching Rhino and see if a line similar to this exists. It should report your locale:
Info XX/XX/2024 XX:XX:XX AM [RhinoCode] Python locale is ('English_United States', 'utf8')
This didnāt fix the problem for me. Are there any updates?
Thanks,
LS
How about this?
Update on my end. I was struggling with this and itās not an option to change computer settings to get it to work. So I first tried change locale and it didnāt work, but as stupid and simple as it may sound - a simple restart of Rhino and it worked without messing with ANY settings.
This was my code log: 'Info 02/12/2024 14:21:04 [RhinoCode] Python locale is ('English_Denmark', '1252')t
Hello I once solved this problem but I think its not that simple.
Iām teaching students in Korea. And I tried to apply same way as I solved this problem to my studentsā 5 computers.
Some of them work, but the others not. I had no time to fix each caes, so I gave up to work with pandas, just export it with json.
This problem has to do with multiple environmental conditions. I hope next release solve this.
@timonielsen Do you know what was the locale before and after? I can try setting my machine to your older locale to see if I can replicate this
So pandas is only working when locale is set to en_US
?
In my experience, No.
Itās because the locale default set is following windowās locale, so we should change it to Linux locale
In my case, I live in Korea. If I print default locale by locale.getlocale() Iāll get Korean_Korea.949, So I need to change it to ko_KR.
It doesnāt matter with Country.
@ģ“ģ ķ I can confirm this. Currently Rhino corrects en-US
to en_US
on launch.
Ok it works now,
need to setlocale to en_US first
if I didnāt and import pandas, it will fail, and I need to restart rhino8 again, no matter I set en_US again
@Huy_Vu The editor tried to install pandas or openpyxl and has failed hence the āCorrupt environmentā message. Would you mind running this in a fresh Rhino and send me the RhinoCodeLogs
command report after running this script?