Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perspective Python install failure - MacOS Catalina #938

Closed
timkpaine opened this issue Feb 21, 2020 · 11 comments
Closed

Perspective Python install failure - MacOS Catalina #938

timkpaine opened this issue Feb 21, 2020 · 11 comments
Labels
Python question Questions about use, potential features, or improvements

Comments

@timkpaine
Copy link
Member

@oshyshkin

Hi, I have the same issue on MacOS Catalina (10.15.3), Python 3.7.3, venv.
However, an error slightly different:

File "setup.py", line 104, in run
      self.run_cmake()
    File "setup.py", line 141, in run_cmake
      self.build_extension_cmake(ext)
    File "setup.py", line 203, in build_extension_cmake
      subprocess.check_call([self.cmake_cmd, os.path.abspath(ext.sourcedir)] + cmake_args, cwd=self.build_temp, env=env, stderr=subprocess.STDOUT)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/subprocess.py", line 347, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError:
 Command '[
 '/usr/local/bin/cmake', 
 '/private/var/folders/qb/5tsj24yx0bs5zgnyj9swprdrxcqb64/T/pip-install-05i5_09v/perspective-python/dist', 
 '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/qb/5tsj24yx0bs5zgnyj9swprdrxcqb64/T/pip-install-05i5_09v/perspective-python/perspective/table', 
 '-DCMAKE_BUILD_TYPE=Release', 
 '-DPSP_CPP_BUILD=1', 
 '-DPSP_WASM_BUILD=0', 
 '-DPSP_PYTHON_BUILD=1', 
 '-DPSP_CPP_BUILD_TESTS=0', 
 '-DPSP_PYTHON_VERSION=3.7.3', 
 '-DPYTHON_EXECUTABLE=/Users/oshyshkin/Documents/Gogo/acpu_terrain/geo/bin/python3', 
 '-DPython_ROOT_DIR=/Users/oshyshkin/Documents/Gogo/acpu_terrain/geo', 
 '-DPython_ROOT=/Users/oshyshkin/Documents/Gogo/acpu_terrain/geo', 
 '-DPSP_CMAKE_MODULE_PATH=/private/var/folders/qb/5tsj24yx0bs5zgnyj9swprdrxcqb64/T/pip-install-05i5_09v/perspective-python/dist/cmake', 
 '-DPSP_CPP_SRC=/private/var/folders/qb/5tsj24yx0bs5zgnyj9swprdrxcqb64/T/pip-install-05i5_09v/perspective-python/dist', 
 '-DPSP_PYTHON_SRC=/private/var/folders/qb/5tsj24yx0bs5zgnyj9swprdrxcqb64/T/pip-install-05i5_09v/perspective-python/dist/../perspective', 
 '-DCMAKE_BUILD_TYPE=Release']' 
 returned non-zero exit status 1.
----------------------------------------
  ERROR: Failed building wheel for perspective-python
Failed to build perspective-python
ERROR: Could not build wheels for perspective-python which use PEP 517 and cannot be installed directly

Cmake:

$ cmake --version
> cmake version 3.16.4
>
> CMake suite maintained and supported by Kitware (kitware.com/cmake).

$ which cmake
>/usr/local/bin/cmake

Any ideas?

@timkpaine timkpaine added question Questions about use, potential features, or improvements Python labels Feb 21, 2020
@timkpaine
Copy link
Member Author

Firstly it couldn't find a bunch of libs (pyarrow, pybind11, boost, tbb). But after that it generated a different error, it doesn't look trivial for me. Maybe it is somehow related to C++ compiling. Here is the latest traceback:

  make[1]: *** [CMakeFiles/psp.dir/all] Error 2
  make: *** [all] Error 2
  Traceback (most recent call last):
    File "/Users/oshyshkin/Documents/Gogo/acpu_terrain/geo/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module>
      main()
    File "/Users/oshyshkin/Documents/Gogo/acpu_terrain/geo/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Users/oshyshkin/Documents/Gogo/acpu_terrain/geo/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 182, in build_wheel
      metadata_directory)
    File "/private/var/folders/qb/5tsj24yx0bs5zgnyj9swprdrxcqb64/T/pip-build-env-xm44b006/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 213, in build_wheel
      wheel_directory, config_settings)
    File "/private/var/folders/qb/5tsj24yx0bs5zgnyj9swprdrxcqb64/T/pip-build-env-xm44b006/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 198, in _build_with_temp_dir
      self.run_setup()
    File "/private/var/folders/qb/5tsj24yx0bs5zgnyj9swprdrxcqb64/T/pip-build-env-xm44b006/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 250, in run_setup
      self).run_setup(setup_script=setup_script)
    File "/private/var/folders/qb/5tsj24yx0bs5zgnyj9swprdrxcqb64/T/pip-build-env-xm44b006/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 143, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 237, in <module>
      cmdclass=dict(build_ext=PSPBuild),
    File "/private/var/folders/qb/5tsj24yx0bs5zgnyj9swprdrxcqb64/T/pip-build-env-xm44b006/overlay/lib/python3.7/site-packages/setuptools/__init__.py", line 144, in setup
      return distutils.core.setup(**attrs)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/private/var/folders/qb/5tsj24yx0bs5zgnyj9swprdrxcqb64/T/pip-build-env-xm44b006/overlay/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 223, in run
      self.run_command('build')
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "setup.py", line 104, in run
      self.run_cmake()
    File "setup.py", line 141, in run_cmake
      self.build_extension_cmake(ext)
    File "setup.py", line 204, in build_extension_cmake
      subprocess.check_call([self.cmake_cmd, '--build', '.'] + build_args, cwd=self.build_temp, env=env, stderr=subprocess.STDOUT)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/subprocess.py", line 347, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/usr/local/bin/cmake', '--build', '.', '--config', 'Release', '--', '-j12']' returned non-zero exit status 2.
  Building wheel for perspective-python (PEP 517) ... error
  ERROR: Failed building wheel for perspective-python

Also, here is a full pip install log:
pip_install.log

@timkpaine
Copy link
Member Author

@oshyshkin theres no compilation errors, this looks like it might have gone OOM. Can you send details about your env:

system_profiler SPHardwareDataType
sw_vers
gcc --version
clang --version

@oshyshkin
Copy link

@timkpaine here is it

$ system_profiler SPHardwareDataType
Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro15,1
      Processor Name: 6-Core Intel Core i7
      Processor Speed: 2,2 GHz
      Number of Processors: 1
      Total Number of Cores: 6
      L2 Cache (per Core): 256 KB
      L3 Cache: 9 MB
      Hyper-Threading Technology: Enabled
      Memory: 16 GB
      Boot ROM Version: 1037.80.53.0.0 (iBridge: 17.16.13050.0.0,0)
      Serial Number (system): C02Y41L4JG5L
      Hardware UUID: 0447CFDA-33CE-55BA-B63F-6B8C53D951D8
      Activation Lock Status: Disabled


$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.15.3
BuildVersion:	19D76


$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin19.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

$ clang --version
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin19.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

@sc1f
Copy link
Contributor

sc1f commented Feb 21, 2020

@oshyshkin are you able to use the wheel from version 0.4.1:

pip3 install perspective-python==0.4.1

Also saw this in the logs:

No rule to make target `/Users/oshyshkin/Documents/Gogo/acpu_terrain/geo/lib/python3.7/site-packages/pyarrow/libarrow_python.15.dylib', needed by `/private/var/folders/qb/5tsj24yx0bs5zgnyj9swprdrxcqb64/T/pip-install-zc6d8xnk/perspective-python/perspective/table/libpsp.so'. Stop.

Did you also run pip install pyarrow==0.15.1 before installing Perspective?

@timkpaine
Copy link
Member Author

@sc1f ah yep that looks like its probably it

@oshyshkin
Copy link

@sc1f pip install pyarrow==0.15.1helped. I had a 0.16.0 version. After that, I had one more error, but the reason was I had neither npm or Yarn.

Thank you all for help!

@timkpaine
Copy link
Member Author

That was fixed by #927 and will be in the next release

@timkpaine
Copy link
Member Author

Closing as this will be resolved by:

@fariszaher
Copy link

Still getting this on pip3 install perspective-python

ERROR: Failed building wheel for perspective-python

@timkpaine
Copy link
Member Author

@fariszaher you've provided no information about your build system, no logs, nothing useful for diagnosing the problems you're encountering.

@timkpaine
Copy link
Member Author

You don't have the required build dependencies installed, follow the docs for developer build: https://perspective.finos.org/docs/md/development.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Python question Questions about use, potential features, or improvements
Projects
None yet
Development

No branches or pull requests

4 participants