Hi,
I am new to Python and Jupyter Notebook. The code is supposed to open a CSV or Excel file, plot the data and to perform analysis. I was able to run a python script successfully on Anaconda Powershell. However, when I run the same script in Jupyter Notebook, I am running into difficulties.
Pl see below for error message when I run the script in the terminal.
Note: when I run the same script from within Jupyter Notebook cell, I get
error: (25, ‘inappropriate ioctl for device’) error.
jovyan@jupyter-ramacs:~/Error_Analysis_Data/physerror$ python physerror.py
[?] Select a data file type:
CSV
Excel
Please choose a csv file:
Traceback (most recent call last):
File “/home/jovyan/Error_Analysis_Data/physerror/physerror.py”, line 1544, in
_user_cli()
File “/home/jovyan/Error_Analysis_Data/physerror/physerror.py”, line 1541, in _user_cli
inq.inq_prompt(inq)
File “/home/jovyan/Error_Analysis_Data/physerror/physerror.py”, line 1026, in inq_prompt
tempdata = Data(data_type=data_ans)
File “”, line 6, in init
File “/home/jovyan/Error_Analysis_Data/physerror/physerror.py”, line 80, in post_init
cls._colname1, cls._colname2 = cls._initdata(cls.user_x_data, cls.user_y_data)
File “/home/jovyan/Error_Analysis_Data/physerror/physerror.py”, line 147, in _initdata
x_data, y_data = reader.csvreader()
File “/home/jovyan/Error_Analysis_Data/physerror/physerror.py”, line 1495, in csvreader
tk = Tk()
File “/opt/conda/lib/python3.10/tkinter/init.py”, line 2299, in init
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
jovyan@jupyter-ramacs:~/Error_Analysis_Data/physerror$