0

I am following these directions: http://www.pygame.org/wiki/CompileUbuntu?parent=Compilation

The instructions give the steps in installing Pygame for Python 3 on Ubuntu.

I am having no problems with it until i reach the python3 setup.py build step. This is what the command outputs:

Traceback (most recent call last):
  File "setup.py", line 109, in <module>
    from setuptools import setup, find_packages
ImportError: No module named 'setuptools'

If i simply run import pygame in both Python 2 and Python 3, it reports that there is no module called pygame.

Is there anything special that is needed to be done? Thanks!

EDIT: Followed @docmarvin 's directions and installed the module setuptools. Still the same error

John Doe
  • 25
  • 1
  • 9
  • Are you using a virtual environment? If not, why not? You have to have setuptools installed. – Two-Bit Alchemist Aug 26 '16 at 14:12
  • No, I have Ubuntu 16.04 installed on my computer – John Doe Aug 26 '16 at 14:15
  • Not a virtual machine, a [virtual environment](http://docs.python-guide.org/en/latest/dev/virtualenvs/) – Two-Bit Alchemist Aug 26 '16 at 14:40
  • As far as I know, I am not using a virtual environment, unless one was installed by default. @Two-BitAlchemist I checked to see if there's a command i can run to verify that I'm not running any, but didn't find any. – John Doe Aug 26 '16 at 14:50
  • Possible duplicate of [Python 3: ImportError "No Module named Setuptools"](http://stackoverflow.com/questions/14426491/python-3-importerror-no-module-named-setuptools) – cxw Aug 26 '16 at 15:56

2 Answers2

0
sudo apt install python3-setuptools
                       ^ separate from Python 2 setuptools.

Per this answer.

Community
  • 1
  • 1
cxw
  • 16,685
  • 2
  • 45
  • 81
-1

Try to install setuptools, e.g. with pip from the command line: pip install setuptools

docmarvin
  • 79
  • 4
  • I installed pip itself using `sudo apt install python-pip` . I then did the `pip install setuptools` and it says that it was successfully installed. However when i run the `python3 setup.py build`, it is still saying there is no module named setuptools – John Doe Aug 26 '16 at 14:30
  • I'm not using python3. Maybe you have to call `pip3 install setuptools` there? Your `pip ...` call might have installed setuptools for the python2 environment installed as well. – docmarvin May 03 '18 at 10:15