I am running ubuntu 16. I have both python 2.7 and 3.5 installed. I want to install cx_freeze latest version for python3. I downloaded the package from their website but couldn't run the setup.py file as it always gave me errors. Also i have installed pip3, but it still doesn't work for me. all the answers online are for older version of cx_freeze so a fresh answer for the new version will be helpful.

  • Stack Overflow is probably better place to ask this question (provided that more details are given). – J.J. Hakala Jun 26 '17 at 7:42
  • What are the error messages you see? Please provide details. – edwinksl Jun 26 '17 at 21:21

cx-Freeze can be installed using pip from the python-pip package in the default Ubuntu repositories. pip has been updated to the latest version (pip-9.0.1) using the command sudo -H pip2 install --upgrade pip

sudo pip install cx_Freeze
Collecting cx_Freeze
Installing collected packages: cx-Freeze
Successfully installed cx-Freeze-5.0.2

>>> import cx_Freeze
>>> dir(cx_Freeze)
['ConfigError', 'ConstantsModule', 'Executable', 'Freezer', 'Module', 'ModuleFinder', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', '__version__', 'bdist_rpm', 'build', 'build_exe', 'common', 'hooks', 'install', 'install_exe', 'main', 'setup', 'sys', 'version']

To install cx_Freeze for Python 3.x use pip3 from the python3-pip package in the default Ubuntu repositories and update pip3 to the latest version using the command: sudo -H pip3 install --upgrade pip

|improve this answer|||||
  • I am getting a errors while doing so, can you tell me how to post the errors ? – Jeet Jul 1 '17 at 5:58
  • Copy all the errors to Ubuntu Pastebin and provide a link to it in a comment. Also you need to preface pip with sudo if you are installing a Python package outside of a Python virtual environment (i.e. globally) or else pip will try to install the package anyway but you'll get errors. – karel Jul 1 '17 at 6:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.