I have been trying for quite some time now to make my Python program run on pc's that don't have python installed. I have issues because I'm using python 3.6.0. In this post I am going to discuss a method I got from this video.
The first thing I did, was install Python 3.5 and create a virtualenv for it, which I activated. You can see how I did that on the post I made earlier today. After I activated the environment, I used this command in cmd in the python 3.5 environment: pip install cx_Freeze
. It got installed with no errors. Then I made this setup.py
file:
from cx_Freeze import setup, Executable
setup(name='vkv',
version='0.1',
description='Berekent de wortels van een vkv',
executables = [Executable('vkv.py')])
The python file that I want to turn into a .exe
file is called vkv.py
. The vkv.py
file and the setup.py
file are both the only 2 files on this path: C:\Users\hp\Desktop\Code\Python testing\distr
.
Ok so now I only have to enter setup.py build
in the command line in order to make the .exe
file. But when I do that, I get a bunch of lines, with an error on the last line:
AttributeError: module 'dis' has no attribute '_unpack_opargs'
Does anyone know what I did wrong? Is it something in the setup.py
file, is it not setting up the virtualenv correctly? And does anyone know what this error means and how I can fix it?