TylerGubala/blenderpy

Error when installing bpy on macos

osianSmith opened this issue · 1 comments

Describe the bug
I've been trying to install BPY on my mac for the last day and a half, but get the following errors. I've attempted to use the wheel and pip install --extra-index-url https://repo.blenderpy.net bpy however with no success

For standard install I get:

Collecting bpy
  Using cached bpy-0.0.0a0.tar.gz (19 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: bpy
  Building wheel for bpy (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [75 lines of output]
      /usr/local/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-12-x86_64-3.9
      creating build/lib.macosx-12-x86_64-3.9/blenderpy
      copying blenderpy/__init__.py -> build/lib.macosx-12-x86_64-3.9/blenderpy
      copying blenderpy/post_install.py -> build/lib.macosx-12-x86_64-3.9/blenderpy
      running build_ext
      Popen(['git', 'version'], cwd=/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495, universal_newlines=False, shell=None, istream=None)
      Popen(['git', 'version'], cwd=/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495, universal_newlines=False, shell=None, istream=None)
      Preparing the build environment
      Searching for compatible Blender online (this will take a while)
      Popen(['git', 'ls-remote', '--tags', 'git://git.blender.org/blender.git'], cwd=/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495, universal_newlines=False, shell=None, istream=None)
      /usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: softbody-stable-v1 is an invalid version and will not be supported in a future release
        warnings.warn(
      /usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: softbody-stable-v2 is an invalid version and will not be supported in a future release
        warnings.warn(
      /usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: softbody-stable-v3 is an invalid version and will not be supported in a future release
        warnings.warn(
      RUN: ['svn', '--non-interactive', 'ls', 'https://svn.blender.org/svnroot/bf-blender//tags']
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/setup.py", line 288, in <module>
          setup(name='bpy',
        File "/usr/local/lib/python3.9/site-packages/setuptools/__init__.py", line 155, in setup
          return distutils.core.setup(**attrs)
        File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup
          return run_commands(dist)
        File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
          dist.run_commands()
        File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
          self.run_command(cmd)
        File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/usr/local/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
          self.run_command('build')
        File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/setup.py", line 186, in run
          self.build_cmake(extension)
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/setup.py", line 216, in build_cmake
          compatible_bpy = bpybuild.sources.get_compatible_sources()
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/.eggs/bpy_build-2.1.0-py3.9.egg/bpybuild/sources.py", line 393, in get_compatible_sources
          matched_version_dict = get_matched_versions()
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/.eggs/bpy_build-2.1.0-py3.9.egg/bpybuild/sources.py", line 376, in get_matched_versions
          svns = svn_tags()
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/.eggs/bpy_build-2.1.0-py3.9.egg/bpybuild/sources.py", line 361, in svn_tags
          return [BlenderSvn(tag_full_path) for tag_full_path in BlenderSvn.tags()]
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/.eggs/bpy_build-2.1.0-py3.9.egg/bpybuild/sources.py", line 264, in tags
          return [posixpath.join(cls.BASE_URL, "tags", _version) for _version in
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/.eggs/bpy_build-2.1.0-py3.9.egg/bpybuild/sources.py", line 264, in <listcomp>
          return [posixpath.join(cls.BASE_URL, "tags", _version) for _version in
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/.eggs/svn-1.0.1-py3.9.egg/svn/common.py", line 339, in list
          for line in self.run_command(
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/.eggs/svn-1.0.1-py3.9.egg/svn/common.py", line 60, in run_command
          return self.external_command(cmd, environment=self.__env, **kwargs)
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/.eggs/svn-1.0.1-py3.9.egg/svn/common_base.py", line 37, in external_command
          raise svn.exception.SvnException(
      svn.exception.SvnException: Command failed with (-6): ['svn', '--non-interactive', 'ls', 'https://svn.blender.org/svnroot/bf-blender//tags']
      dyld[91646]: Symbol not found: _apr_crypto_block_cleanup
        Referenced from: /usr/local/Cellar/subversion/1.14.1_4/lib/libsvn_subr-1.0.dylib
        Expected in: /usr/lib/libaprutil-1.0.dylib
      
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for bpy
  Running setup.py clean for bpy
Failed to build bpy
Installing collected packages: bpy
  DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
  Running setup.py install for bpy ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for bpy did not run successfully.
  │ exit code: 1
  ╰─> [79 lines of output]
      /usr/local/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running install
      /usr/local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.macosx-12-x86_64-3.9
      creating build/lib.macosx-12-x86_64-3.9/blenderpy
      copying blenderpy/__init__.py -> build/lib.macosx-12-x86_64-3.9/blenderpy
      copying blenderpy/post_install.py -> build/lib.macosx-12-x86_64-3.9/blenderpy
      running build_ext
      Popen(['git', 'version'], cwd=/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495, universal_newlines=False, shell=None, istream=None)
      Popen(['git', 'version'], cwd=/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495, universal_newlines=False, shell=None, istream=None)
      Preparing the build environment
      Searching for compatible Blender online (this will take a while)
      Popen(['git', 'ls-remote', '--tags', 'git://git.blender.org/blender.git'], cwd=/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495, universal_newlines=False, shell=None, istream=None)
      /usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: softbody-stable-v1 is an invalid version and will not be supported in a future release
        warnings.warn(
      /usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: softbody-stable-v2 is an invalid version and will not be supported in a future release
        warnings.warn(
      /usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: softbody-stable-v3 is an invalid version and will not be supported in a future release
        warnings.warn(
      RUN: ['svn', '--non-interactive', 'ls', 'https://svn.blender.org/svnroot/bf-blender//tags']
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/setup.py", line 288, in <module>
          setup(name='bpy',
        File "/usr/local/lib/python3.9/site-packages/setuptools/__init__.py", line 155, in setup
          return distutils.core.setup(**attrs)
        File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup
          return run_commands(dist)
        File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
          dist.run_commands()
        File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
          self.run_command(cmd)
        File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/usr/local/lib/python3.9/site-packages/setuptools/command/install.py", line 68, in run
          return orig.install.run(self)
        File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/command/install.py", line 664, in run
          self.run_command('build')
        File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/setup.py", line 186, in run
          self.build_cmake(extension)
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/setup.py", line 216, in build_cmake
          compatible_bpy = bpybuild.sources.get_compatible_sources()
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/.eggs/bpy_build-2.1.0-py3.9.egg/bpybuild/sources.py", line 393, in get_compatible_sources
          matched_version_dict = get_matched_versions()
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/.eggs/bpy_build-2.1.0-py3.9.egg/bpybuild/sources.py", line 376, in get_matched_versions
          svns = svn_tags()
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/.eggs/bpy_build-2.1.0-py3.9.egg/bpybuild/sources.py", line 361, in svn_tags
          return [BlenderSvn(tag_full_path) for tag_full_path in BlenderSvn.tags()]
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/.eggs/bpy_build-2.1.0-py3.9.egg/bpybuild/sources.py", line 264, in tags
          return [posixpath.join(cls.BASE_URL, "tags", _version) for _version in
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/.eggs/bpy_build-2.1.0-py3.9.egg/bpybuild/sources.py", line 264, in <listcomp>
          return [posixpath.join(cls.BASE_URL, "tags", _version) for _version in
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/.eggs/svn-1.0.1-py3.9.egg/svn/common.py", line 339, in list
          for line in self.run_command(
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/.eggs/svn-1.0.1-py3.9.egg/svn/common.py", line 60, in run_command
          return self.external_command(cmd, environment=self.__env, **kwargs)
        File "/private/var/folders/bc/vh9c40j15cv1lcx4czs_kqnw0000gn/T/pip-install-opvfokd1/bpy_be6259c3cd83444fb0263b524cf38495/.eggs/svn-1.0.1-py3.9.egg/svn/common_base.py", line 37, in external_command
          raise svn.exception.SvnException(
      svn.exception.SvnException: Command failed with (-6): ['svn', '--non-interactive', 'ls', 'https://svn.blender.org/svnroot/bf-blender//tags']
      dyld[91653]: Symbol not found: _apr_crypto_block_cleanup
        Referenced from: /usr/local/Cellar/subversion/1.14.1_4/lib/libsvn_subr-1.0.dylib
        Expected in: /usr/lib/libaprutil-1.0.dylib
      
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> bpy

note: This is an issue with the package mentioned above, not pip.

Installing from wheel I get

pip install bpy-2.91a0-cp37-cp37m-macosx_10_13_x86_64.whl                                    
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
ERROR: bpy-2.91a0-cp37-cp37m-macosx_10_13_x86_64.whl is not a supported wheel on this platform.

Desktop (please complete the following information):

  • macOS 12.3 running on intel

Found the fix here: afragen/setup-phpunit#5

Looks like an issue with SVN - to check just run command svn and if you don't get Type 'svn help' for usage. something is broken with svn

To fix it if you have SVN install is to:

brew reinstall apr-util
bash setup-phpunit.sh