You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to install kivy in a virtualenv, following the official instructions. However, when I run pip install kivy I get the following error (full traceback and steps to reproduce below). I am running Ubuntu 16.04 LTS 'Xenial'. Where should config.pxi come from, and what should it contain? Am I missing an installation step, or is this due to an assumption in Kivy's setup.py?
[...]
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 474, in included_files
include_path = self.context.find_include_file(include, None)
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 274, in find_include_file
error(pos, "'%s' not found" % filename)
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/Cython/Compiler/Errors.py", line 177, in error
raise InternalError(message)
Cython.Compiler.Errors.InternalError: Internal compiler error: '../include/config.pxi' not found
The installation process looks for config.pxi in these locations:
utimes("/tmp/pip-build-PQ2L9G/kivy/kivy/graphics/tesselator.pxd", [{1485276501, 0}, {1485276501, 0}]) = 0
stat("/tmp/pip-build-PQ2L9G/kivy/kivy", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
mkdir("/tmp/pip-build-PQ2L9G/kivy/kivy/graphics", 0777) = -1 EEXIST (File exists)
open("/tmp/pip-build-PQ2L9G/kivy/kivy/graphics/instructions.pxd", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 5
fstat(5, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
fstat(5, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
write(5, "include \"../include/config.pxi\"\n"..., 3564) = 3564
[...]
stat("/tmp/pip-build-PQ2L9G/kivy/kivy/graphics/../include/config.pxi", 0x7ffc556c92a0) = -1 ENOENT (No such file or directory)
getcwd("/tmp/pip-build-PQ2L9G/kivy", 1024) = 27
getcwd("/tmp/pip-build-PQ2L9G/kivy", 1024) = 27
stat("./../include/config.pxi", 0x7ffc556c89c0) = -1 ENOENT (No such file or directory)
stat("/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/Cython/Includes/../include/config.pxi", 0x7ffc556c89c0) = -1 ENOENT (No such file or directory)
Full traceback
(kivy) vagrant@vagrant:~$ pip install kivy==1.10.0
Collecting kivy==1.10.0
Using cached Kivy-1.10.0.tar.gz
Complete output from command python setup.py egg_info:
fatal: Not a git repository (or any of the parent directories): .git
Using distutils
Detected Cython version 0.25
Using this graphics system: OpenGL
GStreamer found via pkg-config
WARNING: A problem occurred while running pkg-config --libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer (code 1)
Package sdl2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `sdl2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sdl2' found
Package SDL2_ttf was not found in the pkg-config search path.
Perhaps you should add the directory containing `SDL2_ttf.pc'
to the PKG_CONFIG_PATH environment variable
No package 'SDL2_ttf' found
Package SDL2_image was not found in the pkg-config search path.
Perhaps you should add the directory containing `SDL2_image.pc'
to the PKG_CONFIG_PATH environment variable
No package 'SDL2_image' found
Package SDL2_mixer was not found in the pkg-config search path.
Perhaps you should add the directory containing `SDL2_mixer.pc'
to the PKG_CONFIG_PATH environment variable
No package 'SDL2_mixer' found
running egg_info
creating pip-egg-info/Kivy.egg-info
writing requirements to pip-egg-info/Kivy.egg-info/requires.txt
writing pip-egg-info/Kivy.egg-info/PKG-INFO
writing top-level names to pip-egg-info/Kivy.egg-info/top_level.txt
writing dependency_links to pip-egg-info/Kivy.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/Kivy.egg-info/SOURCES.txt'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-JTLGTF/kivy/setup.py", line 1060, in <module>
] if not skip_cython else [])
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 280, in run
self.find_sources()
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 295, in find_sources
mm.run()
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 526, in run
self.add_defaults()
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 562, in add_defaults
sdist.add_defaults(self)
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/setuptools/command/py36compat.py", line 36, in add_defaults
self._add_defaults_ext()
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/setuptools/command/py36compat.py", line 119, in _add_defaults_ext
build_ext = self.get_finalized_command('build_ext')
File "/usr/lib/python2.7/distutils/cmd.py", line 312, in get_finalized_command
cmd_obj.ensure_finalized()
File "/usr/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
self.finalize_options()
File "/tmp/pip-build-JTLGTF/kivy/setup.py", line 251, in finalize_options
retval = build_ext.finalize_options(self)
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/Cython/Distutils/build_ext.py", line 19, in finalize_options
self.distribution.ext_modules)
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 809, in cythonize
aliases=aliases)
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 714, in create_extension_list
kwds = deps.distutils_info(file, aliases, base).values
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 590, in distutils_info
return (self.transitive_merge(filename, self.distutils_info0, DistutilsInfo.merge)
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 600, in transitive_merge
node, extract, merge, seen, {}, self.cimported_files)[0]
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 605, in transitive_merge_helper
deps = extract(node)
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 581, in distutils_info0
externs = self.cimports_and_externs(filename)[1]
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/Cython/Utils.py", line 44, in wrapper
res = cache[args] = f(self, *args)
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 491, in cimports_and_externs
for include in self.included_files(filename):
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/Cython/Utils.py", line 44, in wrapper
res = cache[args] = f(self, *args)
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 474, in included_files
include_path = self.context.find_include_file(include, None)
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 285, in find_include_file
error(pos, "'%s' not found" % filename)
File "/home/vagrant/.virtualenvs/kivy/local/lib/python2.7/site-packages/Cython/Compiler/Errors.py", line 177, in error
raise InternalError(message)
Cython.Compiler.Errors.InternalError: Internal compiler error: '../include/config.pxi' not found
Steps to reproduce
Because the steps to reproduce include sudo apt-get install, I have placed
them in a Vagrantfile. Vagrant makes it trivial to create and destroy virtual
machines that have the same environment every time. This is useful for
reproducible development environments, but also to demonstrate bugs.
If you do not want to use Vagrant, look for the code below.
config.vm.provision "shell", inline: <<-SHELL
# ... this is the code you need ...
SHELL
I am attempting to install kivy in a virtualenv, following the official instructions. However, when I run
pip install kivy
I get the following error (full traceback and steps to reproduce below). I am running Ubuntu 16.04 LTS 'Xenial'. Where should config.pxi come from, and what should it contain? Am I missing an installation step, or is this due to an assumption in Kivy's setup.py?The installation process looks for config.pxi in these locations:
Investigation
The problem is consistent across versions
The problem occurs both with
pip install kivy==1.10.0
and withpip install git+https://github.com/kivy/kivy.git@master
.Execution context:
The problem occurs in
find_include_file
in Cython 0.25's Main.py.Relevant bits from strace
(Thanks to Julia Evans for her zine explaining
strace
!)Full traceback
Steps to reproduce
Because the steps to reproduce include
sudo apt-get install
, I have placedthem in a Vagrantfile. Vagrant makes it trivial to create and destroy virtual
machines that have the same environment every time. This is useful for
reproducible development environments, but also to demonstrate bugs.
If you do not want to use Vagrant, look for the code below.
Vagrant usage
Vagrantfile
cd
to the directory and runvagrant up
vagrant ssh
to SSH into the virtual machinevagrant destroy
+vagrant up
to recreate the machine from scratchVagrantfile
Call this file
Vagrantfile
. See the previous section for usage.The text was updated successfully, but these errors were encountered: