Posts

Creating executables for machine learning Python scripts

In my previous article , I have showed you how to create an .exe file using PyInstaller. However, it will be a bit of a challenge if your project uses too many libraries (which took me two days to solve the issues I encountered, hence thought of providing a step by step guide for Python users to save their valuable time) . Therefore, in this article I am focusing on creating .exe files for Python scripts for machine learning projects, where libraries such as pandas, numpy, scikit-learn are being used. Here you go.. In my application, I am using following Python libraries; 1. Pandas 2. Numpy 3. Scikit-learn 4. Scipy Most of the times, PyInstaller doesn't recognise all of these libraries. In this case you need to specify these libraries in hooks files one by one. How to do this? let's start from Pandas. Note: Please install PyInstaller (follow the instructions given here ), and keep your Python scripts ready. 1. Pandas You can locate all the hooks files in the ho...

Creating executables with PyInstaller

Python provides various libraries (i.e. Pandas , Scikit-learn ) for data analysis and machine learning. This makes Python one of the most widely used languages in this field. In fact, Forbes named Python one of the top 10 technical skills in terms of job demand growth. Most of the times you are required to create an .exe file for your Python scripts. This will be a bit of challenge if your project uses too many libraries (which I will be discussing in my next article). Therefore, in this article I am focusing on creating .exe files from a simple Python scripts Basically, there are many tools to create executable files from Python scripts. Most popular and widely used tools are py2exe and PyInstaller . However, I encountered few version incompatibility issues with py2exe, thus moved to PyInstaller . Firstly, I will show you how to create a set up file using a simple Python script. Then I will move to a more complex scenario. OK. Let's create our first set up file using a sim...