Reputation: 67
I have been using nuitka to compile python to create executable so that I do not have to share the source code with others. While this has been working well, recently I ran into issues with python programs using pandas
When I run the following command: nuitka --recurse-on et.py
I get a warning: Nuitka:WARNING:et.py:4: Cannot find 'pandas' as relative or absolute import.
But it goes ahead and create a et.exe file. While I try to run this exe file ( ./et.exe), I get the following error:
Traceback (most recent call last): File "/home/babujia/exceltest/et.py", line 4, in import pandas as pd ImportError: No module named pandas
I am using Google Cloud Ubuntu 16.04 and Python 3.5.2
Any help will be appreciated
Upvotes: 1
Views: 930
Reputation: 3
I suggest you use pyinstaller, see here: https://www.pyinstaller.org/ To use it, open the terminal , and type pip install pyinstall to intall pyinstaller on your mechine. Then, open the terminal under the python file you desired to become executable file, and then write: pyinstaller --onefile yourfileName.py . It will create 3 folders. Your'e EXE file is under dist. That's it, it's ready to use.
Upvotes: 0