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

install failure on OSX Ventura #271

Open
steeley opened this issue Dec 17, 2023 · 10 comments
Open

install failure on OSX Ventura #271

steeley opened this issue Dec 17, 2023 · 10 comments

Comments

@steeley
Copy link

steeley commented Dec 17, 2023

following your install instructions:
sudo python3 -m pip install pyo

from pyo import *

produces this error:
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyo/_pyo.cpython-311-darwin.so, 0x0002): Library not loaded: /usr/local/opt/flac/lib/libFLAC.12.dylib
Referenced from: <590F9E88-40CA-3E2C-9C1A-7357E88EDA9E> /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyo/libsndfile.1.dylib
Reason: tried: '/usr/local/opt/flac/lib/libFLAC.12.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/flac/lib/libFLAC.12.dylib' (no such file), '/usr/local/opt/flac/lib/libFLAC.12.dylib' (no such file), '/usr/lib/libFLAC.12.dylib' (no such file, not in dyld cache)

@belangeo
Copy link
Owner

belangeo commented Jan 5, 2024

It should not try to load libFLAC from usr/local/opt... Is there a libFLAC.12.dylib right next to _pyo.cpython-311-darwin.so? Intel or ARM processor?

@steeley
Copy link
Author

steeley commented Jan 6, 2024

This is on MacBook intel i9 OSX Ventura.
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyo/
Screenshot 2024-01-06 at 09 28 19

@belangeo
Copy link
Owner

belangeo commented Jan 6, 2024

@steeley Ok, I think I know what the problem is... Next week, I should be able to build a new installer for you to try. I'll let you know when it's available.

@steeley
Copy link
Author

steeley commented Jan 6, 2024

fantastic - thanks for the help. I look forward to testing for you.

@nmz787
Copy link

nmz787 commented Jan 18, 2024

I get almost the same a similar error on Windows 11, Python 3.12.1, Intel CPU

C:\Users\nathan\code\midi p45>pip install pyo
Collecting pyo==1.0.5
  Using cached pyo-1.0.5.tar.gz (5.2 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [55 lines of output]
      running egg_info
      writing pyo.egg-info\PKG-INFO
      writing dependency_links to pyo.egg-info\dependency_links.txt
      writing entry points to pyo.egg-info\entry_points.txt
      writing top-level names to pyo.egg-info\top_level.txt
      reading manifest file 'pyo.egg-info\SOURCES.txt'
      Traceback (most recent call last):
        File "C:\Users\nathan\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\nathan\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\nathan\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\nathan\AppData\Local\Temp\pip-build-env-m7d8w9ac\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\nathan\AppData\Local\Temp\pip-build-env-m7d8w9ac\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "C:\Users\nathan\AppData\Local\Temp\pip-build-env-m7d8w9ac\overlay\Lib\site-packages\setuptools\build_meta.py", line 480, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "C:\Users\nathan\AppData\Local\Temp\pip-build-env-m7d8w9ac\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 419, in <module>
        File "C:\Users\nathan\AppData\Local\Temp\pip-build-env-m7d8w9ac\overlay\Lib\site-packages\setuptools\__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\nathan\AppData\Local\Temp\pip-build-env-m7d8w9ac\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "C:\Users\nathan\AppData\Local\Temp\pip-build-env-m7d8w9ac\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
          dist.run_commands()
        File "C:\Users\nathan\AppData\Local\Temp\pip-build-env-m7d8w9ac\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "C:\Users\nathan\AppData\Local\Temp\pip-build-env-m7d8w9ac\overlay\Lib\site-packages\setuptools\dist.py", line 963, in run_command
          super().run_command(command)
        File "C:\Users\nathan\AppData\Local\Temp\pip-build-env-m7d8w9ac\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\nathan\AppData\Local\Temp\pip-build-env-m7d8w9ac\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 321, in run
          self.find_sources()
        File "C:\Users\nathan\AppData\Local\Temp\pip-build-env-m7d8w9ac\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 329, in find_sources
          mm.run()
        File "C:\Users\nathan\AppData\Local\Temp\pip-build-env-m7d8w9ac\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 551, in run
          self.add_defaults()
        File "C:\Users\nathan\AppData\Local\Temp\pip-build-env-m7d8w9ac\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 596, in add_defaults
          self.read_manifest()
        File "C:\Users\nathan\AppData\Local\Temp\pip-build-env-m7d8w9ac\overlay\Lib\site-packages\setuptools\command\sdist.py", line 213, in read_manifest
          self.filelist.append(line)
        File "C:\Users\nathan\AppData\Local\Temp\pip-build-env-m7d8w9ac\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 488, in append
          path = convert_path(item)
                 ^^^^^^^^^^^^^^^^^^
        File "C:\Users\nathan\AppData\Local\Temp\pip-build-env-m7d8w9ac\overlay\Lib\site-packages\setuptools\_distutils\util.py", line 139, in convert_path
          raise ValueError("path '%s' cannot be absolute" % pathname)
      ValueError: path '/usr/local/Cellar/flac/1.4.2/lib/libFLAC.12.dylib' cannot be absolute
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

@d4lion
Copy link

d4lion commented Apr 18, 2024

Did you manage to solve the error? I'm trying to download Python on Windows 11 on the same Python version 3.12.1 and when installing pip I get that error.

@steeley
Copy link
Author

steeley commented Apr 18, 2024

still waiting for a new version of PYO installer

@d4lion
Copy link

d4lion commented Apr 18, 2024

Sure, i use a lower python version and all is fine.

@dsholes
Copy link

dsholes commented Aug 19, 2024

I noticed a similar issue with libportmidi, @belangeo. In the wheel building script, I think the wrong libportmidi version is used here. If you download the wheel from PyPi, unzip it, cd into the pyo directory and run otool -l _pyo.cpython-311-darwin.so, you'll see that it's attempting to load the libportmidi from /usr/local/opt/portmidi/lib/libportmidi.2.dylib. In the wheel file, it's actually libportmidi.2.0.3.dylib. So I think that script needs to be updated. Not sure if anything in the setup.py needs to change as well.

Load command 9
          cmd LC_LOAD_DYLIB
      cmdsize 64
         name @loader_path/libportaudio.2.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 3.0.0
compatibility version 3.0.0
Load command 10
          cmd LC_LOAD_DYLIB
      cmdsize 72
         name /usr/local/opt/portmidi/lib/libportmidi.2.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 2.0.3
compatibility version 2.0.0
Load command 11
          cmd LC_LOAD_DYLIB
      cmdsize 56
         name @loader_path/liblo.7.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 12.1.0
compatibility version 12.0.0
Load command 12
          cmd LC_LOAD_DYLIB
      cmdsize 56
         name @loader_path/libsndfile.1.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 2.35.0
compatibility version 2.0.0

@bantonj
Copy link

bantonj commented Sep 19, 2024

On an arm mac I was able to get this to work after getting the error about libflac by install ffmpeg with brew.
brew install ffmpeg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants