0

I've recently installed the latest version of Py2app on my Mac Os X (10.5.8), and I've watched some tutorials on YouTube such as: http://www.youtube.com/watch?v=Zip9H_dLdhI, and http://www.youtube.com/watch?v=5Ehhts9HhE8, but when I copy their main setup code, it gives me an ImportError:

Traceback (most recent call last):
  File "/Users/CarlProject/Rectangles Backup.py", line 7, in <module>
    from setuptools import setup
ImportError: No module named setuptools

This is my setup code, copied and edited from the first YouTube video:

"""
Usage:
    python setup.py py2app

"""

from setuptools import setup

APP = ['Rectangles.py']
DATA_FILES = [('', ['fonts'])]

setup(
    app = APP,
    data_files = DATA_FILES,
    setup_requires = ['py2app'],
)

My Python version is 2.7.5, and I'm using Pygame. The Py2app is the latest: 0.7.3. Yes, everything is on my desktop, and I've installed setuptools 0.9.8 Help!

JaredCubilla
  • 538
  • 1
  • 8
  • 24

2 Answers2

1

Just incurred in the same problem but found the solution.

"For ease of distribution, you may wish to have your setup.py script automatically ensure that setuptools is installed. This requires having a copy of ez_setup in your project, which can be obtained from here:"

http://peak.telecommunity.com/dist/ez_setup.py

(Save it in your project directory with .py extension)

"Once this is done, you simply add the two line ez_setup preamble to the very beginning of your setup.py:"

import ez_setup
ez_setup.use_setuptools()

Source: https://pythonhosted.org/py2app/examples.html

0

You need to install setuptools. Download it from here and then check this out to learn how to install it:

Python Setuptools, easy_install setup mac

Community
  • 1
  • 1
The-IT
  • 660
  • 8
  • 19
  • I've already installed setuptools, several times, on both my 2.7.5 and my 3.3.2 Python. It still gives me the same error : `Traceback (most recent call last): File "/Users/CarlProject/Documents/hi", line 7, in from setuptools import setup ImportError: No module named setuptools`. – JaredCubilla Aug 05 '13 at 12:58