pylcs icon indicating copy to clipboard operation
pylcs copied to clipboard

pip install fails to build a wheel

Open jfpuget opened this issue 5 years ago • 2 comments

environment: python 3.7

pybind11 is not found when building the wheel.

pip install pybind11 before install solves the issue.

jfpuget avatar Sep 27 '20 12:09 jfpuget

Yes, same problem here:

>>> pip install pylcs
Collecting pylcs
  Downloading pylcs-0.0.6.tar.gz (3.9 kB)
Collecting pybind11>=2.2
  Downloading pybind11-2.5.0-py2.py3-none-any.whl (296 kB)
     |████████████████████████████████| 296 kB 3.2 MB/s 
Building wheels for collected packages: pylcs
  Building wheel for pylcs (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: ~/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wi6panc5/pylcs/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wi6panc5/pylcs/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-lodm18r2
       cwd: /tmp/pip-install-wi6panc5/pylcs/
  Complete output (56 lines):
  running bdist_wheel
  running build
  running build_ext
  creating tmp
  gcc -pthread -B ~/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I~/anaconda3/include/python3.8 -c /tmp/tmpftdcelti.cpp -o tmp/tmpftdcelti.o -std=c++14
  cc1plus: warning: command-line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  gcc -pthread -B ~/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I~/anaconda3/include/python3.8 -c /tmp/tmpxcvay2cj.cpp -o tmp/tmpxcvay2cj.o -fvisibility=hidden
  cc1plus: warning: command-line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  building 'pylcs' extension
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-wi6panc5/pylcs/setup.py", line 91, in <module>
      setup(
    File "~/anaconda3/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "~/anaconda3/lib/python3.8/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "~/anaconda3/lib/python3.8/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "~/anaconda3/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "~/anaconda3/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 290, in run
      self.run_command('build')
    File "~/anaconda3/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "~/anaconda3/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "~/anaconda3/lib/python3.8/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "~/anaconda3/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "~/anaconda3/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "~/anaconda3/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 79, in run
      _build_ext.run(self)
    File "~/anaconda3/lib/python3.8/distutils/command/build_ext.py", line 340, in run
      self.build_extensions()
    File "/tmp/pip-install-wi6panc5/pylcs/setup.py", line 86, in build_extensions
      build_ext.build_extensions(self)
    File "~/anaconda3/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
      self._build_extensions_serial()
    File "~/anaconda3/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
      self.build_extension(ext)
    File "~/anaconda3/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
      _build_ext.build_extension(self, ext)
    File "~/anaconda3/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension
      objects = self.compiler.compile(sources,
    File "~/anaconda3/lib/python3.8/distutils/ccompiler.py", line 565, in compile
      self._setup_compile(output_dir, macros, include_dirs, sources,
    File "~/anaconda3/lib/python3.8/distutils/ccompiler.py", line 341, in _setup_compile
      pp_opts = gen_preprocess_options(macros, incdirs)
    File "~/anaconda3/lib/python3.8/distutils/ccompiler.py", line 1076, in gen_preprocess_options
      pp_opts.append("-I%s" % dir)
    File "/tmp/pip-install-wi6panc5/pylcs/setup.py", line 17, in __str__
      import pybind11
  ModuleNotFoundError: No module named 'pybind11'
  ----------------------------------------
  ERROR: Failed building wheel for pylcs
  Running setup.py clean for pylcs
Failed to build pylcs
Installing collected packages: pybind11, pylcs
    Running setup.py install for pylcs ... done
  DEPRECATION: pylcs was installed using the legacy 'setup.py install' method, because a wheel could not be built for it. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
Successfully installed pybind11-2.5.0 pylcs-0.0.6

Could you please confirm that this will be fixed? It would be great to be able to use pylcs in my library...

johentsch avatar Oct 12 '20 13:10 johentsch

I have the same issue. OS: RHEL 7.5 pip: 19.3.1 python 3.6

pip install pybind11==2.5.0 pylcs==0.0.6

[91m ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1kjer3jj/pylcs/setup.py'"'"'; file='"'"'/tmp/pip-install-1kjer3jj/pylcs/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-qb29hlqp --python-tag cp36 cwd: /tmp/pip-install-1kjer3jj/pylcs/ Complete output (56 lines): running bdist_wheel running build running build_ext creating tmp gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/usr/include/openssl -fPIC -I/usr/include/python3.6m -c /tmp/tmp088d10w2.cpp -o tmp/tmp088d10w2.o -std=c++14 gcc: error: unrecognized command line option ‘-std=c++14’ gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/usr/include/openssl -fPIC -I/usr/include/python3.6m -c /tmp/tmp38w6bsbr.cpp -o tmp/tmp38w6bsbr.o -std=c++11 gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/usr/include/openssl -fPIC -I/usr/include/python3.6m -c /tmp/tmpo27u2324.cpp -o tmp/tmpo27u2324.o -fvisibility=hidden building 'pylcs' extension Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-1kjer3jj/pylcs/setup.py", line 103, in zip_safe=False, File "/usr/local/lib/python3.6/site-packages/setuptools/init.py", line 145, in setup return distutils.core.setup(**attrs) File "/usr/lib64/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib64/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/local/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 192, in run self.run_command('build') File "/usr/lib64/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib64/python3.6/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib64/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/local/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 84, in run _build_ext.run(self) File "/usr/lib64/python3.6/distutils/command/build_ext.py", line 339, in run self.build_extensions() File "/tmp/pip-install-1kjer3jj/pylcs/setup.py", line 86, in build_extensions build_ext.build_extensions(self) File "/usr/lib64/python3.6/distutils/command/build_ext.py", line 448, in build_extensions self._build_extensions_serial() File "/usr/lib64/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial self.build_extension(ext) File "/usr/local/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 205, in build_extension _build_ext.build_extension(self, ext) File "/usr/lib64/python3.6/distutils/command/build_ext.py", line 533, in build_extension depends=ext.depends) File "/usr/lib64/python3.6/distutils/ccompiler.py", line 566, in compile depends, extra_postargs) File "/usr/lib64/python3.6/distutils/ccompiler.py", line 341, in _setup_compile pp_opts = gen_preprocess_options(macros, incdirs) File "/usr/lib64/python3.6/distutils/ccompiler.py", line 1075, in gen_preprocess_options pp_opts.append("-I%s" % dir) File "/tmp/pip-install-1kjer3jj/pylcs/setup.py", line 17, in str import pybind11 ModuleNotFoundError: No module named 'pybind11'

ERROR: Failed building wheel for pylcs

UsachevDY avatar Feb 03 '21 10:02 UsachevDY