FedoraForum.org - Fedora Support Forums and Community
Results 1 to 1 of 1
  1. #1
    Join Date
    Oct 2011
    Posts
    110

    Pygame...no font?

    Hi,

    I'm having a few problems with pygame, i'm a lot of a newbie to it, so I'm probably missing something obvious. However, here's basically what I am doing. Do I have to append libraries like in C++? If so how?

    Code:
    import pygame
    
    pygame.init()
    
    if not pygame.font:
        print("No fonts!")
    
    font = pygame.font.Font(None, 25)
    text = .........
    Now once I head off back to the terminal I type
    Code:
    $ python3 ch1.py
    
    ch1.py:52: RuntimeWarning: use font: No module named font
    (ImportError: No module named font)
      font = pygame.font.Font(None, 25)
    Traceback (most recent call last):
      File "ch1.py", line 52, in <module>
        font = pygame.font.Font(None, 25)
      File "/usr/lib/python3.2/site-packages/pygame/__init__.py", line 70, in __getattr__
        raise NotImplementedError(MissingPygameModule)
    NotImplementedError: font module not available
    (ImportError: No module named font)
    Tactics & Solutions Tried

    1. Reinstalled Pygame -> pygame yum installed successfully, no complaints

    2. Checked pygame.font
    Code:
    #CHANGED
    if not pygame.font:
        print("Font not found")
    
    #TO
    if pygame.font:
        print("Font Found!")
    else:
        print("Font not found...")
    Output:
    Code:
    Font found!
    I still get the above error though.

    3. tried...
    Code:
    import pygame.font
    output...
    Code:
     File "ch1.py", line 6, in <module>
        import pygame.font
    ImportError: No module named font
    How to I install the module?


    So, here we are with an as yet unsolved problem

    Thank you.
    Last edited by Mepoe; 28th February 2013 at 12:37 AM. Reason: Ending change

Similar Threads

  1. Pygame problem
    By 1eftHer0 in forum Programming & Packaging
    Replies: 1
    Last Post: 18th October 2011, 09:00 PM
  2. Pygame?
    By Sombrero in forum Gamers' Lounge
    Replies: 0
    Last Post: 30th December 2010, 06:58 PM
  3. Want pygame for Enterprise Linux 6 (el6)
    By CajunBill in forum Gamers' Lounge
    Replies: 0
    Last Post: 21st December 2010, 01:39 AM
  4. Things missing for pygame
    By 1xused in forum Using Fedora
    Replies: 4
    Last Post: 28th October 2008, 06:03 AM
  5. Pygame - Python
    By fishlip in forum Using Fedora
    Replies: 11
    Last Post: 3rd October 2008, 12:49 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •