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
Related
I am trying to install the Python module simplecrypto on a Windows machine. To do this I run the following:
C:\Python36\Scripts>pip install simplecrypto
However, upon running this partway through the installation process I receive the following error:
...
Crypto.PublicKey._fastmath.
building 'Crypto.Random.OSRNG.winrandom' extension
error: [WinError 3] The system cannot find the path specified: 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\PlatformSDK\\lib'
----------------------------------------
Command "c:\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\EDM-P\\AppData\\Local\\Temp\\pip-build-teqxfnwt\\PyCrypto\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\EDM-P\AppData\Local\Temp\pip-nrmsip8r-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\EDM-P\AppData\Local\Temp\pip-build-teqxfnwt\PyCrypto\
Why is this the case?
An error occurs when it attempts to install PyCrypto, which is a requirement of the package. The GitHub README mentions:
If the dependency installation fail on Windows, you may want to use a
prebuilt installer. If you wish to compile it I suggest using the
Mingw tools as indicated here.
Install it from here and then compile by
install MinGW with C++ Compiler option checked add C:\MinGW\bin to
your PATH in PYTHONPATH\Lib\distutils, create a file distutils.cfg and
add these lines:
[build] compiler=mingw32
EDIT: Looks like I have to install Visual Studio 2015...Can I install dlib without VS 2015? I already have older versions pre-installed with Windows.
I am using Python 3.5, trying to install dlib on PyCharm in the terminal and this is what I am getting, and every search on these errors I do... I find stuff on Visual Studio which I don't have the GUI + I don't have vcvarsall.bat in the VC folder of any of the Visual Studio versions (8, 11, 12, 14). I have searched a good amount before posting this question on the Web.
Do I need to download Visual Studio latest version to get vcvarsall.bat ?
This is CMakeLists.txt:
cmake_minimum_required(VERSION ${CMAKE_VERSION})
project(IntelFortranImplicit Fortran)
add_custom_command(
OUTPUT output.cmake
COMMAND ${CMAKE_COMMAND} -P ${IntelFortranImplicit_SOURCE_DIR}/detect.cmake
)
add_library(FortranLib hello.f output.cmake)
This is the error when I do: pip install dlib
Collecting dlib
Using cached dlib-19.6.1.tar.gz
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Complete output from command C:\Users\tiger\Anaconda3\envs\TensorFlowExample\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tiger\\AppDat
a\\Local\\Temp\\pip-build-gjtgkl6a\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code
, __file__, 'exec'))" bdist_wheel -d C:\Users\tiger\AppData\Local\Temp\tmprc21rnv_pip-wheel- --python-tag cp35:
running bdist_wheel
running build
error: Cannot find cmake, ensure it is installed and in the path.
You can install cmake using the instructions at https://cmake.org/install/
You can also specify its path with --cmake parameter.
----------------------------------------
Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running setup.py install for dlib ... error
Complete output from command C:\Users\tiger\Anaconda3\envs\TensorFlowExample\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tiger\\AppD
ata\\Local\\Temp\\pip-build-gjtgkl6a\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(co
de, __file__, 'exec'))" install --record C:\Users\tiger\AppData\Local\Temp\pip-dk1naa28-record\install-record.txt --single-version-externally-managed --compile
:
running install
running build
error: Cannot find cmake, ensure it is installed and in the path.
You can install cmake using the instructions at https://cmake.org/install/
You can also specify its path with --cmake parameter.
----------------------------------------
Command "C:\Users\tiger\Anaconda3\envs\TensorFlowExample\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tiger\\AppData\\Local\\Temp\\pip-bu
ild-gjtgkl6a\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))"
install --record C:\Users\tiger\AppData\Local\Temp\pip-dk1naa28-record\install-record.txt --single-version-externally-managed --compile" failed with error code
1 in C:\Users\tiger\AppData\Local\Temp\pip-build-gjtgkl6a\dlib\
Solution found here: Using Anaconda installing manager..!
Running the following in PyCharm Terminal: conda install -c conda-forge dlib=19.4
I was able to use dlib! :)
Huge thanks to birryree in the comments for letting me know!
Open Anaconda Prompt in Administrative mode.
conda update conda 3. conda update anaconda
conda create -n dlib_env python=3.7
conda activate dlib_env
conda install -c conda-forge dlib
python
7.1 >>> import dlib 7.2 >>> dlib.version
Source
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
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
I have installed Homebrew, Xcode and all the necessary tools but when I executed this command on the terminal: brew install matplotlib
The following error occurred after installation
1 warning and 1 error generated.
error: command 'clang' failed with exit status 1
Cleaning up...
Command /usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;file='/private/var/folders/g7/nt2vgm9x0wv_r0pz6sm_18y00000gn/T/pip_build_Joshua/matplotlib/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/g7/nt2vgm9x0wv_r0pz6sm_18y00000gn/T/pip-OxzEFW-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/g7/nt2vgm9x0wv_r0pz6sm_18y00000gn/T/pip_build_Joshua/matplotlib
Storing debug log for failure in /Users/Joshua/.pip/pip.log
Does anyone know how to fix this problem? The matplotlib does not work on my python script file.
1) Do you have any errors if you run brew doctor?
2) If you have a brewed Python installed, you should be using the brewed pip to install matplotlib. ie. pip install matplotlib