2

My goal is to deploy an application I developed in python. I have a mac and I am trying to download cx_Freeze from:

https://pypi.python.org/pypi?:action=display&name=cx_Freeze&version=5.0.2#downloadsenter

When I download cx_Freeze, it tells me that I have to select an application to run the program. So, I tried selecting Idle because I used python to develop the app. However, it continuously fails to decode the download.

I have a setup script written in python and saved as setup.py in my applications folder.

import sys
from cx_Freeze import setup, Executable
base = None
if sys.platform == 'Win32' : base = 'Win32GUI'
setup( name ='Bid Score Calculator',
       version = '1.0',
       description = 'Bid Score Calculator',
       author = 'Brian Haney',
       options = {'build_exe': opts },
       executables = [Executeable( 'Bid Draft Interface.py', base= base)])

Ultimately, I am unsure of how to deploy my application. My questions are 1) What application supports a cx_Freeze download? 2) How do I use the setup script, to deploy the app.

Thanks in advance for any help or comments- I really appreciate it.

Disclaimer - I have been trying to use cx_Freeze for going on two hours, I have read and researched online and have been unable to find anything that helps. Further, I believe an answer to this question will serve a wide audience.

Brian Haney
  • 57
  • 1
  • 7

1 Answers1

2

You definitely need to check out this page. Obviously it will not open with the IDLE since it is stored to be installed. What you really need at this stage is to open up a terminal in the dictionary where your whl file (in other words cx_Freeze) was installed and run:

python36 -m pip install somepackagename.whl

DO NOT RENAME.

OR

You could just run:

python36 -m pip install cx_Freeze

which will download and install for you.


Your setup script looks fine except you have not defined opts in the script.

Simon
  • 8,992
  • 8
  • 49
  • 76
  • Thanks for you help Simon. Your advice was definitely a step in the right direction. I read the page you sent. When I go to my command terminal and enter (python --version) the response is python 2.7.10. So, I went to the python webpage and downloaded the latest version, python 3.6, the installation on my computer was listed as successful. However, when i type (python --version) in my terminal, the reading is still 2.7.10. Additionally, when I type (pip --version) in the terminal, the response is command not found. Thus, I am unsure of how to proceed. Thanks again for you help!! – Brian Haney Feb 21 '18 at 01:50
  • @BrianHaney How about `python36 --version`. You have both the integrated version of Python plus the one you installed. – Simon Feb 21 '18 at 01:55
  • @BrianHaney You will also need to install pip (named `pip36` once installed). [This page](https://stackoverflow.com/questions/17271319/how-do-i-install-pip-on-macos-or-os-x) tells you how to do it. – Simon Feb 21 '18 at 01:57
  • If `python36`, `python3.6` cannot be found you may need to add it to path, but that should not be necessary. – Simon Feb 21 '18 at 01:59
  • Each Python version installed will have its version number followed by `python` – Simon Feb 21 '18 at 02:03
  • So, I am getting further. I have both pip and cx_Freeze downloaded. However, when I type 'pip install 'program name'' into the command prompt, it responds 'could not find version that satisfies the requirement program name (from versions: ) No matching distribution found for program name – Brian Haney Feb 21 '18 at 06:39
  • How do I create a version that satisfies the requirement? – Brian Haney Feb 21 '18 at 06:41
  • @BrianHaney The problem is that you are using the pip for Python 2.7. Try running `which pip` to make sure I am correct. Unless you have not yet installed pip for 3.6 and you installed for 2.7 by mistake then `python36 -m pip install cx_Freeze` should work. – Simon Feb 21 '18 at 09:26