question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

0.7.1 cannot be installed on darwin/arm64 with Python 3.9

See original GitHub issue

What happened: pip install β€œfastparquet==0.7.1”

Failed, because it tried to install numpy 1.20.0 (even if a newer version [1.21.2] was already present in the venv) which failed to build from sources. This is because:

  • there is no prebuilt package for fastparquet 0.7.1 at PyPI for darwin/arm64/cp39
  • and setup.py uses oldest-supported-numpy as a build dependency
  • and oldest-supported-numpy is currently broken for darwin/arm64/cp39 because it points to a version (1.20.0) for which there is no prebuilt package at PyPI for the platform/python version combo
  • and building numpy from sources on darwin/arm64 is notoriously fragile (and obviously broken for the numpy/OS/python version combo)

**Suggestion: Do not use the oldest-supported-numpy meta-package. It is a well meant, but unfortunately unsustainable approach. It results in requiring 1 specific version for an platform/python version combo which is likely to break frequently. Just requiring a minimum version of numpy for fastparquet has IMHO higher probability of success. In this specific case, it would’ve actually worked πŸ˜ƒ.

What you expected to happen:

fasparquet 0.7.1. to be installed (without installing an older version of numpy).

Minimal Complete Verifiable Example: See above.

Environment:

  • Dask version: N/A (I just use fastparquet with pandas)
  • Python version: 3.9.5 (default, May 3 2021, 19:12:05) [Clang 12.0.5 (clang-1205.0.22.9)]
  • Operating System:
ProductName:	macOS
ProductVersion:	11.4
BuildVersion:	20F71
  • Install method (conda, pip, source): pip (which tries to build wheel package)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
cpaton8commented, Oct 4, 2021

Hi all, I am also trying to install fastparquet using poetry via poetry add fastparquet which sources from PyPI and just wanted to confirm that I am also receiving an error regarding the numpy version (see below). numpy 1.21.2 is already installed when trying to add fastparquet.

error message details EnvCommandError

Command [β€˜/Users/christinapaton/opt/miniconda3/envs/survey2/bin/pip’, β€˜install’, β€˜β€“no-deps’, β€˜file:///Users/christinapaton/Library/Caches/pypoetry/artifacts/d7/2b/8e/09320fd2f81069fcc2682cccc7e084152fdedd4e4e9e09fd9c2c7a2910/fastparquet-0.7.1.tar.gz’] errored with the following return code 1, and output: Processing /Users/christinapaton/Library/Caches/pypoetry/artifacts/d7/2b/8e/09320fd2f81069fcc2682cccc7e084152fdedd4e4e9e09fd9c2c7a2910/fastparquet-0.7.1.tar.gz Building wheels for collected packages: fastparquet Building wheel for fastparquet (setup.py): started Building wheel for fastparquet (setup.py): finished with status β€˜error’ ERROR: Command errored out with exit status 1: command: /Users/christinapaton/opt/miniconda3/envs/survey2/bin/python3.9 -u -c β€˜import io, os, sys, setuptools, tokenize; sys.argv[0] = β€˜"’"’/private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-req-build-9ud3vg6w/setup.pyβ€™β€œ'β€β€˜; file=β€™β€œ'β€β€˜/private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-req-build-9ud3vg6w/setup.pyβ€™β€œ'β€β€˜;f = getattr(tokenize, β€˜"β€™β€œβ€˜openβ€™β€β€™β€œβ€˜, open)(file) if os.path.exists(file) else io.StringIO(β€™β€β€˜β€œβ€˜from setuptools import setup; setup()β€™β€β€™β€œβ€˜);code = f.read().replace(β€™β€β€˜"’\r\nβ€™β€œ'β€β€˜, β€˜"’"’\nβ€™β€œ'β€β€˜);f.close();exec(compile(code, file, β€˜"β€™β€œβ€˜execβ€™β€β€™β€œβ€˜))’ bdist_wheel -d /private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-wheel-rv0mi906 cwd: /private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-req-build-9ud3vg6w/ Complete output (27 lines): Traceback (most recent call last): File β€œ<string>”, line 1, in <module> File β€œ/private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-req-build-9ud3vg6w/setup.py”, line 47, in <module> setup( File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/init.py”, line 152, in setup _install_setup_requires(attrs) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/init.py”, line 147, in _install_setup_requires dist.fetch_build_eggs(dist.setup_requires) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/dist.py”, line 806, in fetch_build_eggs resolved_dists = pkg_resources.working_set.resolve( File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/pkg_resources/init.py”, line 766, in resolve dist = best[req.key] = env.best_match( File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/pkg_resources/init.py”, line 1051, in best_match return self.obtain(req, installer) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/pkg_resources/init.py”, line 1063, in obtain return installer(requirement) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/dist.py”, line 877, in fetch_build_egg return fetch_build_egg(self, req) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/installer.py”, line 80, in fetch_build_egg wheel.install_as_egg(dist_location) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/wheel.py”, line 95, in install_as_egg self._install_as_egg(destination_eggdir, zf) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/wheel.py”, line 103, in _install_as_egg self._convert_metadata(zf, destination_eggdir, dist_info, egg_info) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/wheel.py”, line 124, in _convert_metadata os.mkdir(destination_eggdir) FileExistsError: [Errno 17] File exists: β€˜/private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-req-build-9ud3vg6w/.eggs/numpy-1.19.3-py3.9-macosx-10.9-x86_64.egg’ ---------------------------------------- ERROR: Failed building wheel for fastparquet Running setup.py clean for fastparquet ERROR: Command errored out with exit status 1: command: /Users/christinapaton/opt/miniconda3/envs/survey2/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = 'β€β€˜"’/private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-req-build-9ud3vg6w/setup.pyβ€™β€œ'β€β€˜; file=β€™β€œ'β€β€˜/private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-req-build-9ud3vg6w/setup.pyβ€™β€œ'β€β€˜;f = getattr(tokenize, β€˜"β€™β€œβ€˜openβ€™β€β€™β€œβ€˜, open)(file) if os.path.exists(file) else io.StringIO(β€™β€β€˜β€œβ€˜from setuptools import setup; setup()β€™β€β€™β€œβ€˜);code = f.read().replace(β€™β€β€˜"’\r\nβ€™β€œ'β€β€˜, β€˜"’"’\nβ€™β€œ'β€β€˜);f.close();exec(compile(code, file, β€˜"β€™β€œβ€˜execβ€™β€β€™β€œβ€˜))’ clean --all cwd: /private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-req-build-9ud3vg6w Complete output (27 lines): Traceback (most recent call last): File β€œ<string>”, line 1, in <module> File β€œ/private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-req-build-9ud3vg6w/setup.py”, line 47, in <module> setup( File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/init.py”, line 152, in setup _install_setup_requires(attrs) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/init.py”, line 147, in _install_setup_requires dist.fetch_build_eggs(dist.setup_requires) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/dist.py”, line 806, in fetch_build_eggs resolved_dists = pkg_resources.working_set.resolve( File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/pkg_resources/init.py”, line 766, in resolve dist = best[req.key] = env.best_match( File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/pkg_resources/init.py”, line 1051, in best_match return self.obtain(req, installer) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/pkg_resources/init.py”, line 1063, in obtain return installer(requirement) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/dist.py”, line 877, in fetch_build_egg return fetch_build_egg(self, req) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/installer.py”, line 80, in fetch_build_egg wheel.install_as_egg(dist_location) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/wheel.py”, line 95, in install_as_egg self._install_as_egg(destination_eggdir, zf) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/wheel.py”, line 103, in _install_as_egg self._convert_metadata(zf, destination_eggdir, dist_info, egg_info) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/wheel.py”, line 124, in _convert_metadata os.mkdir(destination_eggdir) FileExistsError: [Errno 17] File exists: β€˜/private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-req-build-9ud3vg6w/.eggs/numpy-1.19.3-py3.9-macosx-10.9-x86_64.egg’ ---------------------------------------- ERROR: Failed cleaning build dir for fastparquet Failed to build fastparquet Installing collected packages: fastparquet Running setup.py install for fastparquet: started Running setup.py install for fastparquet: finished with status β€˜error’ ERROR: Command errored out with exit status 1: command: /Users/christinapaton/opt/miniconda3/envs/survey2/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = 'β€β€˜"’/private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-req-build-9ud3vg6w/setup.pyβ€™β€œ'β€β€˜; file=β€™β€œ'β€β€˜/private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-req-build-9ud3vg6w/setup.pyβ€™β€œ'β€β€˜;f = getattr(tokenize, β€˜"β€™β€œβ€˜openβ€™β€β€™β€œβ€˜, open)(file) if os.path.exists(file) else io.StringIO(β€™β€β€˜β€œβ€˜from setuptools import setup; setup()β€™β€β€™β€œβ€˜);code = f.read().replace(β€™β€β€˜"’\r\nβ€™β€œ'β€β€˜, β€˜"’"’\nβ€™β€œ'β€β€˜);f.close();exec(compile(code, file, β€˜"β€™β€œβ€˜execβ€™β€β€™β€œβ€˜))’ install --record /private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-record-bcplr9pw/install-record.txt --single-version-externally-managed --compile --install-headers /Users/christinapaton/opt/miniconda3/envs/survey2/include/python3.9/fastparquet cwd: /private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-req-build-9ud3vg6w/ Complete output (27 lines): Traceback (most recent call last): File β€œ<string>”, line 1, in <module> File β€œ/private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-req-build-9ud3vg6w/setup.py”, line 47, in <module> setup( File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/init.py”, line 152, in setup _install_setup_requires(attrs) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/init.py”, line 147, in _install_setup_requires dist.fetch_build_eggs(dist.setup_requires) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/dist.py”, line 806, in fetch_build_eggs resolved_dists = pkg_resources.working_set.resolve( File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/pkg_resources/init.py”, line 766, in resolve dist = best[req.key] = env.best_match( File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/pkg_resources/init.py”, line 1051, in best_match return self.obtain(req, installer) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/pkg_resources/init.py”, line 1063, in obtain return installer(requirement) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/dist.py”, line 877, in fetch_build_egg return fetch_build_egg(self, req) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/installer.py”, line 80, in fetch_build_egg wheel.install_as_egg(dist_location) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/wheel.py”, line 95, in install_as_egg self._install_as_egg(destination_eggdir, zf) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/wheel.py”, line 103, in _install_as_egg self._convert_metadata(zf, destination_eggdir, dist_info, egg_info) File β€œ/Users/christinapaton/opt/miniconda3/envs/survey2/lib/python3.9/site-packages/setuptools/wheel.py”, line 124, in _convert_metadata os.mkdir(destination_eggdir) FileExistsError: [Errno 17] File exists: β€˜/private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-req-build-9ud3vg6w/.eggs/numpy-1.19.3-py3.9-macosx-10.9-x86_64.egg’ ---------------------------------------- ERROR: Command errored out with exit status 1: /Users/christinapaton/opt/miniconda3/envs/survey2/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = 'β€β€˜"’/private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-req-build-9ud3vg6w/setup.pyβ€™β€œ'β€β€˜; file=β€™β€œ'β€β€˜/private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-req-build-9ud3vg6w/setup.pyβ€™β€œ'β€β€˜;f = getattr(tokenize, β€˜"β€™β€œβ€˜openβ€™β€β€™β€œβ€˜, open)(file) if os.path.exists(file) else io.StringIO(β€™β€β€˜β€œβ€˜from setuptools import setup; setup()β€™β€β€™β€œβ€˜);code = f.read().replace(β€™β€β€˜"’\r\nβ€™β€œ'β€β€˜, β€˜"’"’\nβ€™β€œ'β€β€˜);f.close();exec(compile(code, file, β€˜"β€™β€œβ€˜exec’”’"β€˜))’ install --record /private/var/folders/_l/23fh_hz93hnb8jphrxrrl7dw0000gn/T/pip-record-bcplr9pw/install-record.txt --single-version-externally-managed --compile --install-headers /Users/christinapaton/opt/miniconda3/envs/survey2/include/python3.9/fastparquet Check the logs for full command output.

at ~/.poetry/lib/poetry/utils/env.py:1180 in run 1176β”‚ output = subprocess.check_output( 1177β”‚ cmd, stderr=subprocess.STDOUT, **kwargs 1178β”‚ ) 1179β”‚ except CalledProcessError as e: β†’ 1180β”‚ raise EnvCommandError(e, input=input) 1181β”‚ 1182β”‚ return decode(output) 1183β”‚ 1184β”‚ def execute(self, bin, *args, **kwargs):

1reaction
martindurantcommented, Aug 19, 2021

Let me summarise the problem for myself, to see if I understand the situation clearly.

  • there are no wheels for fastparquet on your system, because at the last tag, cibuildtool was not configured or could not yet make them
  • when asking pip to build from source, it picks a numpy version using oldest-supported-numpy, in order to build a binary that works on all current numpy versions
  • for the specific version of python, oldest-supported-numpy pointed to a version which hasn’t been made a wheel on your OS either (and pip fails to build it from source)
  • oldest-supported-numpy should have, in the meantime, been updated to something that does work.

Do I have it right?

I wonder, is conda a possible avenue for you, if only to create the wheel you need?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot pip install mediapipe on Macos M1 - Stack Overflow
We do this because we'd like to install Python 3.8 for x86_64 where mediapipe is supported. Now that we have brew for x86_64,...
Read more >
Python Releases for Windows
Note that Python 3.9.15 cannot be used on Windows 7 or earlier. No files for this release. Python 3.8.15 - Oct. 11, 2022....
Read more >
Installing Ray β€” Ray 2.2.0 - the Ray documentation
You can install the latest official version of Ray from PyPI on linux, ... For Python 3.8 and 3.9, the m before the...
Read more >
Installation β€” pandas 1.5.2 documentation
Python version support#. Officially Python 3.8, 3.9, 3.10 and 3.11. Installing pandas#. Installing with AnacondaΒ ...
Read more >
Installing scikit-learn
Install the version of scikit-learn provided by your operating system or Python distribution. This is a quick option for those who have operating...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found