Repository navigation
Closed
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected
Description
- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption).
- OS version and name: 12.2 and MacOS Montery
- Poetry version: 1.1.14
- Gist with the contents of your pyproject.toml file:
Issue
I am having trouble installing h5py as dependency for my project. For the ARM M1 macs, that was a problem also for pip a while ago, but it got fixed: h5py/h5py#2065
I am actually also able to install h5py just fine system wide with pip3 install h5py, however if I try with poetry install I get:
Installing dependencies from lock file
Package operations: 12 installs, 0 updates, 0 removals
• Installing h5py (2.10.0): Failed
EnvCommandError
Command ['/Users/xxx/Library/Caches/pypoetry/virtualenvs/esi-syncopy-vESaVMMA-py3.8/bin/pip', 'install', '--no-deps', 'file:///Users/xxx/Library/Caches/pypoetry/artifacts/e1/c6/e9/c8624c01cae03e2dcc08141108abf4864b207a81f6baec2b7d2f519af9/h5py-2.10.0.tar.gz'] errored with the following return code 1, and output:
Processing /Users/xxx/Library/Caches/pypoetry/artifacts/e1/c6/e9/c8624c01cae03e2dcc08141108abf4864b207a81f6baec2b7d2f519af9/h5py-2.10.0.tar.gz
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: h5py
Building wheel for h5py (setup.py): started
Building wheel for h5py (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
/Users/xxx/Library/Caches/pypoetry/virtualenvs/esi-syncopy-vESaVMMA-py3.8/lib/python3.8/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
running build_ext
Loading library to get version: libhdf5.dylib
error: dlopen(libhdf5.dylib, 0x0006): tried: 'libhdf5.dylib' (no such file), '/usr/local/lib/libhdf5.dylib' (no such file), '/usr/lib/libhdf5.dylib' (no such file), '/private/var/folders/wq/b2v4yh29055d_mcsphwlmk8c0000gp/T/pip-req-build-s81x_dn1/libhdf5.dylib' (no such file), '/usr/local/lib/libhdf5.dylib' (no such file), '/usr/lib/libhdf5.dylib' (no such file)
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for h5py
Running setup.py clean for h5py
Failed to build h5py
Installing collected packages: h5py
Running setup.py install for h5py: started
Running setup.py install for h5py: finished with status 'error'
error: subprocess-exited-with-error
× Running setup.py install for h5py did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
/Users/xxx/Library/Caches/pypoetry/virtualenvs/esi-syncopy-vESaVMMA-py3.8/lib/python3.8/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
running install
/Users/xxx/Library/Caches/pypoetry/virtualenvs/esi-syncopy-vESaVMMA-py3.8/lib/python3.8/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
running build_ext
Loading library to get version: libhdf5.dylib
error: dlopen(libhdf5.dylib, 0x0006): tried: 'libhdf5.dylib' (no such file), '/usr/local/lib/libhdf5.dylib' (no such file), '/usr/lib/libhdf5.dylib' (no such file), '/private/var/folders/wq/b2v4yh29055d_mcsphwlmk8c0000gp/T/pip-req-build-s81x_dn1/libhdf5.dylib' (no such file), '/usr/local/lib/libhdf5.dylib' (no such file), '/usr/lib/libhdf5.dylib' (no such file)
[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.
╰─> h5py
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
at ~/.poetry/lib/poetry/utils/env.py:1195 in _run
1191│ output = subprocess.check_output(
1192│ cmd, stderr=subprocess.STDOUT, **kwargs
1193│ )
1194│ except CalledProcessError as e:
→ 1195│ raise EnvCommandError(e, input=input_)
1196│
1197│ return decode(output)
1198│
1199│ def execute(self, bin, *args, **kwargs):
I tried installing the binaries outside of poetry (with brew), and run poetry add h5py --no-binary which I thought was supported since #5600, however I get a NoSuchOptionException.
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected
Activity
dimbleby commentedon Jul 29, 2022
poetryis just runningpip, and pip is telling you what the problem is:poetry cannot fix this for you.
tensionhead commentedon Jul 29, 2022
Ok.. well the system
piphas no problem, any ideas how this diverging behaviour is possible?mkniewallner commentedon Jul 29, 2022
The output you shared indicates that Poetry tries to install
2.10.0, which does not contain the fix you mention in h5py/h5py#2065, so you probably need to update your lockfile, or update the minimum range forh5py, then retry the install to get a newer version ofh5py.tensionhead commentedon Jul 30, 2022
Thx @mkniewallner, indeed the pinning of
h5py<3was the problem! Due to another dependency I can't change this right now on the repo, but I could install h5py 3.7 without problems on my M1 with poetry so I am closing this 🙂github-actions commentedon Mar 1, 2024
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.