Skip to content

Install fails: No module named 'pybind11' #32

Closed
@DomHudson

Description

@DomHudson

Summary

Unfortunately the setup process has started to fail. Unsure what the cause of this is, it could to do with how setup.py imports pybind11.

System

Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
[GCC 7.3.0] on linux
Name: pip
Version: 10.0.1
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04 LTS
Release:	18.04
Codename:	bionic

$ pip install git+https://github.com/pybind/python_example

Collecting git+https://github.com/pybind/python_example
Cloning https://github.com/pybind/python_example to /tmp/pip-req-build-_2f417pj
Collecting pybind11>=2.2 (from python-example==0.0.1)
Using cached https://files.pythonhosted.org/packages/12/90/0f92a575dc60c8fba6d0c91d6b45abdb1058da9ebed40400cbcfad2ac0a7/pybind11-2.2.3-py2.py3-none-any.whl
Building wheels for collected packages: python-example
Running setup.py bdist_wheel for python-example ... error
Complete output from command /home/dom/env/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-req-build-_2f417pj/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 /tmp/pip-wheel-f4j10o78 --python-tag cp36:
running bdist_wheel
running build
running build_ext
creating tmp
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-EKG1lX/python3.6-3.6.5=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -I/home/dom/env/include/python3.6m -c /tmp/tmpfcwb_k_e.cpp -o tmp/tmpfcwb_k_e.o -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-EKG1lX/python3.6-3.6.5=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -I/home/dom/env/include/python3.6m -c /tmp/tmpggfsh938.cpp -o tmp/tmpggfsh938.o -fvisibility=hidden
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
building 'python_example' extension
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-req-build-_2f417pj/setup.py", line 103, in
zip_safe=False,
File "/home/dom/env/lib/python3.6/site-packages/setuptools/init.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/dom/env/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 202, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/dom/env/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 78, in run
_build_ext.run(self)
File "/usr/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/tmp/pip-req-build-_2f417pj/setup.py", line 90, in build_extensions
build_ext.build_extensions(self)
File "/usr/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/usr/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/home/dom/env/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 199, in build_extension
_build_ext.build_extension(self, ext)
File "/usr/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
depends=ext.depends)
File "/usr/lib/python3.6/distutils/ccompiler.py", line 566, in compile
depends, extra_postargs)
File "/usr/lib/python3.6/distutils/ccompiler.py", line 341, in _setup_compile
pp_opts = gen_preprocess_options(macros, incdirs)
File "/usr/lib/python3.6/distutils/ccompiler.py", line 1075, in gen_preprocess_options
pp_opts.append("-I%s" % dir)
File "/tmp/pip-req-build-_2f417pj/setup.py", line 20, in str
import pybind11
ModuleNotFoundError: No module named 'pybind11'


Failed building wheel for python-example
Running setup.py clean for python-example
Failed to build python-example
Installing collected packages: pybind11, python-example
Running setup.py install for python-example ... done
Successfully installed pybind11-2.2.3 python-example-0.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions