I wrote a Python program in Jupyter Notebook. The program uses libraries installed through Anaconda. I need to get a separate executable Python file that would work on forks of Ubuntu and Debian.
I created the .py file from the .ipynb file through the menu in the Jupyter Notebook:
File -> Download as -> Python (.py).
Next, I try to run .py file through the Terminal in Linux:
>>> python3 name_of_created_file.py
And I get an error:
Traceback (most recent call last):
File "name_of_created_file.py", line 11, in <module>
import pandas as pd
ModuleNotFoundError: No module named 'pandas'
As I understand it, there are not enough software libraries to run the program. On the same computer (Linux) in Jupyter Notebook, my program works well.
How to get a working program separately from Jupiter Notebook? To do this, I need to separately install software libraries?

python --versionin your shell what output do you get? It might be that the Python being used in your Jupyter Notebook is not the same one as in your terminal, in which case you won't have the same libraries installed and would have to either specify to run it with the Anaconda Python interpreter, or install the same libraries in the Python interpreter being used by default in your terminal.Python 2.7.15rc1python3? You can usewhereis python3and get the path to the python executable you used to run the script in your terminal. Then in your Jupyter notebook you can create a cell containingimport sysfollowed bysys.executableand run that to get the path to the interpreter used by Jupyter. If they're different then that's your problem.