EthanRosenthal / medium-data-bakeoff

A python library bakeoff for medium sized datasets
MIT License
23 stars 7 forks source link

Running `poetry install` fails #5

Open avriiil opened 1 year ago

avriiil commented 1 year ago

I'm trying to reproduce the bakeoff but running into issues setting up my environment.

Running poetry install from within a local fork of the repo returns:

 on 🌱 main [⇣] is πŸ“¦ v0.1.0 via 🐍 v3.9.13 via πŸ‘Ύ basetook 24s
medium-data-bakeoff ❯ poetry install
Installing dependencies from lock file

Package operations: 51 installs, 0 updates, 0 removals

  β€’ Installing llvmlite (0.39.1): Failed

  CalledProcessError

  Command '['/Users/rpelgrim/Library/Caches/pypoetry/virtualenvs/medium-data-bakeoff-XGE5taBU-py3.9/bin/python', '-m', 'pip', 'install', '--disable-pip-version-check', '--prefix', '/Users/rpelgrim/Library/Caches/pypoetry/virtualenvs/medium-data-bakeoff-XGE5taBU-py3.9', '--no-deps', '/Users/rpelgrim/Library/Caches/pypoetry/artifacts/b4/fb/d9/aec196fa7df30babbeb0ef8aae777ee200956d9edff24b34f064b88d38/llvmlite-0.39.1-cp39-cp39-macosx_11_0_arm64.whl']' returned non-zero exit status 1.

  at ~/mambaforge/lib/python3.9/subprocess.py:528 in run
       524β”‚             # We don't call process.wait() as .__exit__ does that for us.
       525β”‚             raise
       526β”‚         retcode = process.poll()
       527β”‚         if check and retcode:
    β†’  528β”‚             raise CalledProcessError(retcode, process.args,
       529β”‚                                      output=stdout, stderr=stderr)
       530β”‚     return CompletedProcess(process.args, retcode, stdout, stderr)
       531β”‚
       532β”‚

The following error occurred when trying to handle this error:

  EnvCommandError

  Command ['/Users/rpelgrim/Library/Caches/pypoetry/virtualenvs/medium-data-bakeoff-XGE5taBU-py3.9/bin/python', '-m', 'pip', 'install', '--disable-pip-version-check', '--prefix', '/Users/rpelgrim/Library/Caches/pypoetry/virtualenvs/medium-data-bakeoff-XGE5taBU-py3.9', '--no-deps', '/Users/rpelgrim/Library/Caches/pypoetry/artifacts/b4/fb/d9/aec196fa7df30babbeb0ef8aae777ee200956d9edff24b34f064b88d38/llvmlite-0.39.1-cp39-cp39-macosx_11_0_arm64.whl'] errored with the following return code 1, and output:
  Processing /Users/rpelgrim/Library/Caches/pypoetry/artifacts/b4/fb/d9/aec196fa7df30babbeb0ef8aae777ee200956d9edff24b34f064b88d38/llvmlite-0.39.1-cp39-cp39-macosx_11_0_arm64.whl
  ERROR: Wheel 'llvmlite' located at /Users/rpelgrim/Library/Caches/pypoetry/artifacts/b4/fb/d9/aec196fa7df30babbeb0ef8aae777ee200956d9edff24b34f064b88d38/llvmlite-0.39.1-cp39-cp39-macosx_11_0_arm64.whl is invalid.

  at ~/mambaforge/lib/python3.9/site-packages/poetry/utils/env.py:1476 in _run
      1472β”‚                 output = subprocess.check_output(
      1473β”‚                     command, stderr=subprocess.STDOUT, env=env, **kwargs
      1474β”‚                 )
      1475β”‚         except CalledProcessError as e:
    β†’ 1476β”‚             raise EnvCommandError(e, input=input_)
      1477β”‚
      1478β”‚         return decode(output)
      1479β”‚
      1480β”‚     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:

The following error occurred when trying to handle this error:

  PoetryException

  Failed to install /Users/rpelgrim/Library/Caches/pypoetry/artifacts/b4/fb/d9/aec196fa7df30babbeb0ef8aae777ee200956d9edff24b34f064b88d38/llvmlite-0.39.1-cp39-cp39-macosx_11_0_arm64.whl

  at ~/mambaforge/lib/python3.9/site-packages/poetry/utils/pip.py:51 in pip_install
       47β”‚
       48β”‚     try:
       49β”‚         return environment.run_pip(*args)
       50β”‚     except EnvCommandError as e:
    β†’  51β”‚         raise PoetryException(f"Failed to install {path.as_posix()}") from e

Any direction here would be appreciated. Thank you for making this work public!

stoneyv commented 1 year ago

I was able to do a successful poetry install on ubuntu 20.04 with python 3.9.5. I am using pyenv to manage multiple python versions. The poetry install in the docker build works as well.

EthanRosenthal commented 1 year ago

I'm guessing this may be an issue to trying to install on a Mac? I can try on a Mac tomorrow and see if I can debug.

avriiil commented 1 year ago

Yeah looks like it might be an M1 chip issue.

On Tue, 15 Nov 2022 at 04:42, Ethan Rosenthal @.***> wrote:

I'm guessing this may be an issue to trying to install on a Mac? I can try on a Mac tomorrow and see if I can debug.

β€” Reply to this email directly, view it on GitHub https://github.com/EthanRosenthal/medium-data-bakeoff/issues/5#issuecomment-1314763881, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQLWMSUW5NQMV6I4ACYAZ4LWIMIBZANCNFSM6AAAAAAR735ORY . You are receiving this because you authored the thread.Message ID: @.***>

--

Richard Pelgrim +31 (0)6 374 807 31

EthanRosenthal commented 1 year ago

It always is! Since you're getting stuck on installing llvmlite, my guess is that you're going to need to brew install some packages and set some environment variables. Something like the following has worked for me:

Install llvm

brew install llvm@11

Set the following environment variable

LLVM_CONFIG=$(brew --prefix llvm@11)/bin/llbm-config