So I've been following some instructions on how to install Pygame from this link here :http://programarcadegames.com/index.php?showpart=0#section_0.3
The the final three commands are as follows
$
# Use mercurial to clone current code
hg clone https://bitbucket.org/pygame/pygame
# Build and install
cd pygame
sudo python3 setup.py
$
When I run the final command to run the setup file, I get this error after everything before it runs fine.
building 'pygame.imageext' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -D_REENTRANT -DENABLE_NEWBUF=1 -I/usr/X11R6/include -I/usr/include/SDL -I/usr/include/SDL -I/usr/include -I/usr/include -I/usr/include/python2.7 -c src/imageext.c -o build/temp.linux-x86_64-2.7/src/imageext.o
In file included from src/pygame.h:32:0,
from src/imageext.c:49:
src/_pygame.h:80:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Any ideas as to how I cann fix this issue and complete my Pygame installation?
You need to install the python development package, which includes those header files.
sudo apt-get install python-dev
Related
I am trying to install python-mcrypt-1.1 with below command
pip install http://labix.org/download/python-mcrypt/python-mcrypt-1.1.tar.gz
but i am getting below error i have tried with sudo permission as well but not able to install and getting below error
running install
running build
running build_ext
building 'mcrypt' extension
creating build
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="1.1" -I/usr/include/python2.7 -c mcrypt.c -o build/temp.linux-x86_64-2.7/mcrypt.o
mcrypt.c:23:20: fatal error: mcrypt.h: No such file or directory
#include <mcrypt.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
python-mcrypt is a Python interface to the mcrypt library. You have to install mcrypt first.
found the solution for this issue .
For mcrypt.h, libmcrypt-dev needs to install by following command
sudo apt-get install libmcrypt-dev
after installing with above command python-crypt got install successfully with below command
pip install http://labix.org/download/python-mcrypt/python-mcrypt-1.1.tar.gz
I am trying to install aspell-python package for spell correction.
Facing problem while installing the package.
Error :
python setup.py install
running install
running build
running build_ext
building 'aspell' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c aspell.c -o build/temp.linux-i686-2.7/aspell.o
aspell.c:53:20: fatal error: aspell.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
GCC is already install version gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
libaspell15 is already install
Need to install sudo apt-get install libaspell-dev
I am trying to install PyBluez-0.18 on my Linux Mint 15 machine, but got an error message during the installation process. I tried searching online to see if others might have encountered this problem, but I could not find any.
I list the command I tried to execute, along with the error message I received. Could someone tell me what I am doing wrong, and what I need to do to reso
tri108354#prtgc004-Latitude-E6320 ~/Downloads/PyBluez-0.18 $ python setup.py install
running install
running build
running build_py
running build_ext
building 'bluetooth._bluetooth' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/tri108354/anaconda/include/python2.7 -c bluez/btmodule.c -o build/temp.linux-i686-2.7/bluez/btmodule.o
In file included from bluez/btmodule.c:20:0:
bluez/btmodule.h:5:33: fatal error: bluetooth/bluetooth.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
You need to install libbluetooth-dev package for compiling your code
sudo apt-get install libbluetooth-dev
That should install the bluetooth header files.
Terminal Error Return
root#sys:~/Downloads/PIL-fork-1.1.7-py3# python3 setup.py build
running build
running build_py
running build_ext
building 'PIL._imaging' extension
gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC -IlibImaging -I/usr/include -I/usr/local/include -I/usr/include/python3.2mu -c _imaging.c -o build/temp.linux-x86_64-3.2/_imaging.o
_imaging.c:75:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
root#sys:~/Downloads/PIL-fork-1.1.7-py3#
this file are downloaded from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil
how to install this Aspell PIL Python 3?
Following below step to complete install PIL
sudo aptitude install python3-setuptools
sudo easy_install3 pip
sudo apt-get install python3-dev
download the Pillow-master.zip
wget https://github.com/python-imaging/Pillow/archive/master.zip
go to downloaded directory and,
sudo unzip Pillow-master.zip
python3 setup.py build
python3 setup.py install
IF I use --no-site-packages option while creating a virtualenv and try to install MySQL-python afterwards I get :
error: command 'gcc' failed with exit status 1
Here are the steps I followed:
easy_install-2.7 --install-dir ~/src/lib/ virtualenv==dev
~/src/lib/virtualenv --no-site-packages ENV
.../ENV/bin/pip-2.7 install MySQL-python
I also tried downloading mySQL-python and install using
.../ENV/bin/python setup.py build
I get the same error wither way.
I assume I am missing the gcc from this virtualenv but how do I get it installed in this virtualenv while still using --no-site-packages option.
thanks
EDIT: as per below comments here is the whole error output.
running build
running build_py
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
running build_ext
building '_mysql' extension
gcc -m32 -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/include/mysql -I/opt/lampp/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv
In file included from /opt/lampp/include/python2.7/Python.h:58,
from pymemcompat.h:10,
from _mysql.c:29:
/opt/lampp/include/python2.7/pyport.h:849:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
In file included from /usr/include/mysql/my_config.h:11,
from _mysql.c:36:
/usr/include/mysql/my_config_x86_64.h:1032:1: warning: "SIZEOF_LONG" redefined
In file included from /opt/lampp/include/python2.7/Python.h:8,
from pymemcompat.h:10,
from _mysql.c:29:
/opt/lampp/include/python2.7/pyconfig.h:989:1: warning: this is the location of the previous definition
error: command 'gcc' failed with exit status 1
you need the mysql-devel package. to install, you need to specify the actual package name -
sudo apt-get install libmysql++-dev
Have you tried using the sudo command. I am guessing you are having permission issues than issue with anything else here. Usually an install throws up this error as it is trying to access directories with root permission which you don't own.