I'm not using Ubuntu (I'm on Solus), so I can't do the PPA. I've followed all the install guides I can find for manual installation but none seem to be working.
I get the error:
x86_64-solus-linux-gcc: error trying to exec 'as': execvp: No such file or directory
/tmp/pip-build-utw792cs/kivy/kivy/graphics/scissor_instructions.c:4:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'x86_64-solus-linux-gcc' failed with exit status 1
\----------------------------------------
Command "/usr/bin/python3.5 -u -c "import setuptools, tokenize;\__file__='/tmp/pip-build-utw792cs/kivy/setup.py';f=getattr(tokenize, 'open', open)(\__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, \__file__, 'exec'))" install --record /tmp/pip-rvj0_9sh-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-utw792cs/kivy/
I've searched around for install guides but they all end with the same error at some point. Does anyone know how to install Kivy because it seems like a really cool tool.
sudo pip install kivy
Assuming you already installed pip and other dependencies like mesalib-devel
Related
I am trying to load cartopy onto my system using pip install cartopy
The version of Python environment I am using is 3.5.3, which I am unable to change. I'm getting the following error:
error: command 'gcc' failed with exit status 1
It also gives me this error:
Command "/opt/apps/python/3.5.3/bin/python3.5 -u -c "import setuptools,
tokenize;__file__='/tmp/pip-build-
eprit6ql/cartopy/setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code,
__file__, 'exec'))" install --record /tmp/pip-4mg12j4p-record/install-
record.txt --single-version-externally-managed --compile --user --prefix="
failed with error code 1 in /tmp/pip-build-eprit6ql/cartopy/
(Sorry it's a little messy)
If there's another way to install using pip or a similar alternative (like basemap for example) that could be recommended that would be helpful too!
Thanks for any help!
Installation instructions recommend to use conda. If you want to install from sources (using pip) you have to install a number of requirements.
PS. And to help us to help you you'd better show us the full error message. 'gcc' failed is not enough to understand what's going on.
I get the following error message:
*bytes, CFIndex length, CFAllocatorRef bytesDeallocator);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
error: command 'gcc' failed with exit status 1
I used this command:
"//anaconda/bin/python -u -c "import setuptools,
tokenize;file='/private/var/folders/sg/p9ztjwgx1v1cctrr2hmdymcr0000gp/T/pip-build-y_mai_3m/kivy/setup.py';f=getattr(tokenize,
'open', open)(file);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, file, 'exec'))" install
--record /var/folders/sg/p9ztjwgx1v1cctrr2hmdymcr0000gp/T/pip-_3c7ty_r-record/install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in
/private/var/folders/sg/p9ztjwgx1v1cctrr2hmdymcr0000gp/T/pip-build-y_mai_3m/kivy/
What could be the reason, how to solve this problem?
I figured it out, as Cython was located inside anaconda pip couldn't install kivy, and used pip3 to install Cython and so kivy, now it is installed :) thanks people
I am using python2.7 and created a virtual environment 'kivyenv'.
First i install Cython and then kivy in kivyenv.
pip install Cython
pip install kivy
kivy failed to install giving some error :-
In file included from /tmp/pip-build-4T9oG4/kivy/kivy/graphics/opengl.c:274:0:
/tmp/pip-build-4T9oG4/kivy/kivy/graphics/gl_redirect.h:43:22: fatal error: GL/gl.h: No such file or directory
# include <GL/gl.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/root/kivyenv/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-4T9oG4/kivy/setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-3__DxE-record/install-record.txt --single-version-externally-managed --compile --install-headers
/root/kivyenv/include/site/python2.7/kivy" failed with error code 1 in /tmp/pip-build-4T9oG4/kivy/
I am using Ubuntu 16.
This is happening because you do not have dependency libraries installed on your system, specifically the ones for OpenGL - most likely you do not have mesa packages installed.
Follow the instructions for your specific distribution on how to install all of the needed dependencies at: https://kivy.org/docs/installation/installation-linux.html#using-software-packages
had the same problem. the following worked for me:
pip(3) install Cython==0.26
pip(3) install kivy
hope it helps
Trying to install lxml on mac osx yosemite for python 2.7.10
Using command pip install lxml, I receive: /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:33:10: fatal error: 'stdio.h' file not found
#include
^
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
Complete error: Command "/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;file='/private/var/folders/h2/hwn1y9sd54b6tl2wyb6vc_kh0000gp/T/pip-build-St5xbb/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/h2/hwn1y9sd54b6tl2wyb6vc_kh0000gp/T/pip-8QC6OG-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/h2/hwn1y9sd54b6tl2wyb6vc_kh0000gp/T/pip-build-St5xbb/lxml
I have searched and cannot find a solution. Can someone please point me in the right direction?
if you have xcode installed try the following
$xcode-select --install
You could also try installing python via homebrew
$brew install python
See these links that are related to you problem.
Fatal error: #include <stdio.h> generated after "pip install mysql-python" command
GCC fatal error: stdio.h: No such file or directory
I've been working on a python script, first using the Psychopy compiler, which already included all I needed, but now I need to make it the more independent as possible. I have the script working on a Windows computer, but I also want it to work in OSX.
The script uses pyglet and I followed this post in order to install it. However, when I reach the latest step, which is installing PyObjc, I have the following error:
40 warnings and 1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Cleaning up...
Command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;__file__='/private/var/folders/fk/1plt8wj53_d183pv59scmg4m0000gn/T/pip_build_JL/pyobjc-core/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/fk/1plt8wj53_d183pv59scmg4m0000gn/T/pip-HfEjaW-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/fk/1plt8wj53_d183pv59scmg4m0000gn/T/pip_build_JL/pyobjc-core
Storing debug log for failure in /Users/JL/.pip/pip.log
Why does this error appears? What can I do to solve it?
Terminal post:
xcode-select --install
may be can help you.
Try installing pyobjc separately first.
On OSX 10.7 or 10.8, try:
env CC=clang pip -U pyobjc-core
env CC=clang pip -U pyobjc
On OSX 10.9, try:
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install pyobjc