pybind11 not resolved automatically
vamatya opened this issue ยท 3 comments
Platform: x86_64
OS: UBUNTU 20.04
Python Version: 10 or 9
Installation command: python setup.py install (from source)
Error:
Searching for pygalmesh
Reading https://pypi.org/simple/pygalmesh/
Downloading https://files.pythonhosted.org/packages/a5/94/4a817068bfc4ca8e0d91856e2d22186381800139ae8685b73e3cf94c4689/pygalmesh-0.10.7.tar.gz#sha256=2db842cfd43aed9beb2c3a2dae6276206d16587131b6f068f6c5ba049b6af2f9
Best match: pygalmesh 0.10.7
Processing pygalmesh-0.10.7.tar.gz
Writing /tmp/easy_install-47vxhrdh/pygalmesh-0.10.7/setup.cfg
Running pygalmesh-0.10.7/setup.py -q bdist_egg --dist-dir /tmp/easy_install-47vxhrdh/pygalmesh-0.10.7/egg-dist-tmp-eqi8o1hb
Traceback (most recent call last):
File "/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/sandbox.py", line 158, in save_modules/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/sandbox.py", line 200, in setup_context
yield saved
File "
yield
File "/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/sandbox.py", line 261, in run_setup/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/sandbox.py", line 48, in _execfile
_execfile(setup_script, ns)
File "
exec(code, globals, locals)
File "/tmp/easy_install-47vxhrdh/pygalmesh-0.10.7/setup.py", line 3, in
with open("README.rst", "r", encoding="utf-8") as fh:
ModuleNotFoundError: No module named 'pybind11'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/WORKSPACE/XRD/xrd_simulator/setup.py", line 7, in /miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/init.py", line 108, in setup
setuptools.setup(
File "
return distutils.core.setup(**attrs)
File "/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
return run_commands(dist)
File "
dist.run_commands()
File "/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 970, in run_commands/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/dist.py", line 945, in run_command
self.run_command(cmd)
File "
super().run_command(command)
File "/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 989, in run_command/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/command/install.py", line 92, in run
cmd_obj.run()
File "
self.do_egg_install()
File "/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/command/install.py", line 153, in do_egg_install/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/command/easy_install.py", line 437, in run
cmd.run(show_deprecation=False)
File "
self.easy_install(spec, not self.no_deps)
File "/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/command/easy_install.py", line 686, in easy_install/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/command/easy_install.py", line 736, in install_item
return self.install_item(None, spec, tmpdir, deps, True)
File "
self.process_distribution(spec, dist, deps)
File "/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/command/easy_install.py", line 785, in process_distribution/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/pkg_resources/init.py", line 896, in resolve
distros = WorkingSet([]).resolve(
File "
dist = self._resolve_dist(
File "/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/pkg_resources/init.py", line 932, in _resolve_dist/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/pkg_resources/init.py", line 1262, in best_match
dist = best[req.key] = env.best_match(
File "
return self.obtain(req, installer)
File "/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/pkg_resources/init.py", line 1298, in obtain/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/command/easy_install.py", line 709, in easy_install
return installer(requirement) if installer else None
File "
return self.install_item(spec, dist.location, tmpdir, deps)
File "/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/command/easy_install.py", line 734, in install_item/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/command/easy_install.py", line 931, in install_eggs
dists = self.install_eggs(spec, download, tmpdir)
File "
return self.build_and_install(setup_script, setup_base)
File "/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/command/easy_install.py", line 1203, in build_and_install/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/command/easy_install.py", line 1189, in run_setup
self.run_setup(setup_script, setup_base, args)
File "
run_setup(setup_script, args)
File "/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/sandbox.py", line 251, in run_setup/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/contextlib.py", line 153, in exit
with setup_context(setup_dir):
File "
self.gen.throw(typ, value, traceback)
File "/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/sandbox.py", line 192, in setup_context/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/contextlib.py", line 153, in exit
with save_modules():
File "
self.gen.throw(typ, value, traceback)
File "/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/sandbox.py", line 171, in save_modules/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/sandbox.py", line 145, in resume
saved_exc.resume()
File "
raise exc.with_traceback(self._tb)
File "/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/sandbox.py", line 158, in save_modules/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/sandbox.py", line 200, in setup_context
yield saved
File "
yield
File "/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/sandbox.py", line 261, in run_setup/miniconda3/envs/xrdsim_src_py3.10/lib/python3.10/site-packages/setuptools/sandbox.py", line 48, in _execfile
_execfile(setup_script, ns)
File "
exec(code, globals, locals)
File "/tmp/easy_install-47vxhrdh/pygalmesh-0.10.7/setup.py", line 3, in
with open("README.rst", "r", encoding="utf-8") as fh:
ModuleNotFoundError: No module named 'pybind11'
Explicit pip install pybind11
before installation from source works.
Thanks for posting issues on our lib! ๐ This is great for our development ๐
To the point, this stack-trace does not make sense to me. Why would a
with open("README.rst", "r", encoding="utf-8") as fh:
require bindings? Is there no additional/expanded stack-trace?
Cheers ๐
Axel
Sorry for the sparsity of the error log. I've updated the error log above with more text. Hope it is more helpful. :)
Regards
Vinay
Thanks ๐
This looks like a misleading stacktrace.
In fact I believe this is an error of pygalmesh
not xrd_simulator
. In the pygalmesh
setup.py file there is on line 3 a pybind11 import.. So that is not going to work out of the box with pip ..... ๐
As stated in the xrd_simulator
docs one needs to resolve pygalmesh installation before running the setup.py install. In general pygalmesh
is dependent on cgal and will require os-specific binaries. Again, using conda to install pygalmesh
will in general work cross platform.
Good to know that explicit pip install pybind11
before installation from source works. But I feel hesitant to add pybind11
to our setup.py requirements. This should be resolved upstream in pygalmesh
imo.
Cheers
Axel