A
A
Archer *range attack +10*2016-03-14 01:21:32
Python
Archer *range attack +10*, 2016-03-14 01:21:32

What's wrong with pygame (Mac OS X)?

Installed macports with all dependencies, installed py-game package, it installed without errors. I checked with the port installed command - it is installed.
I run the program from the terminal, in response:

Traceback (most recent call last):
  File "a.py", line 1, in <module>
    import pygame
ImportError: No module named pygame

as if nothing was installed.
In a.py, there is only one line of code to check:
import pygame
Why is this happening, what should I do?
UPD:
Sorry, I completely forgot:
pygame version: 1.9.1
Python version: 2.7.11
I am writing in Python 2
More
port installed gives:
py-game @1.9.1_8 (active)
  py27-cython @0.23.4_0 (active)
  py27-game @1.9.1_8 (active)
  py27-nose @1.3.7_0 (active)
  py27-numpy @1.10.4_0+gfortran (active)
  py27-setuptools @19.2_0 (active)
  python2_select @0.0_1 (active)
  python27 @2.7.11_2 (active)

python outputs:
Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 12:54:16)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Mindlin, 2016-03-14
@kon-rafikov

Most likely the library is 32-bit, and python is 64-bit. This is a common problem

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question