Requirements:
This will create a dll and exe for MyProgram in the deploy folder.
If you try to run MyProgram.exe and you import libraries like os , you can get No module named ...
Since I use os , I get this error:
If you run "MyProgram.exe" and you use the standard libraries, you may get No module named... errors.
In my case, I got:
Unhandled exception: IronPython.Runtime.Exceptions.ImportException: no na med os module
...
To fix this problem, copy the Lib folder from C:\Program Files (x86)\IronPython 2.7.1\ to the deploy folder that you just created. Then, before importing libraries that throw errors, modify MyProgram.py as follows:
import sys sys.path.append("Lib")
As a last step, copy the following files from the C:\Program Files (x86)\IronPython 2.7.1\ folder to deploy :
- IronPython.dll
- IronPython.Modules.dll
- Microsoft.Dynamic.dll
- Microsoft.Scripting.dll
Now you can zip the deploy folder and send it!
Gezim source share