Python Forum
Pandas issue on Raspberry Pi - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: Pandas issue on Raspberry Pi (/thread-23924.html)



Pandas issue on Raspberry Pi - hesco40 - Jan-23-2020

I have a simple pandas import with a simple script on a raspberry pi. I can run it through the command line and through the editor. However, when I try to double click it to run it, it fails before doing anything. I see the screen flash and then it goes away without running the code.

import time
import pandas as pd
df = pd.read_csv('bar.csv')
print(df.tail())
time.sleep(60)
I ran this little test script because my larger script was having a similar issue so I tried to troubleshoot all of the possible issues. If I comment out all the pandas stuff it runs just fine when you double click it. What has me questioning my sanity is the fact that it does run just fine in the command line but not when I try to double click the file. The csv is in the same file location as the python file.


RE: Pandas issue on Raspberry Pi - buran - Jan-23-2020

are you sure it's executed with the same python interpreter when you click on it vs. when run from command line?
try this to check:
import sys
import time
import pandas as pd
df = pd.read_csv('bar.csv')
print(df.tail())
input(sys.executable + '\nclcik any key...')



RE: Pandas issue on Raspberry Pi - hesco40 - Jan-23-2020

I am running the same interpreter on both. It still fails to launch.

I commetened out everything but the import pandas and the sleep. It still fails to load.


RE: Pandas issue on Raspberry Pi - joe_momma - Jan-24-2020

if you want an executable program you'll need pyinstaller other wise it's a basic text file with a suffix of py. when you double click it may bring up an default interpreter
but will not run your code.