modularml / max

A collection of sample programs, notebooks, and tools which highlight the power of the MAX Platform
https://www.modular.com
Other
348 stars 45 forks source link

[Modular CLI]: Installation of PyPI package fails: Failed to fetch wheel / Unsupported archive type #226

Open samufi opened 1 month ago

samufi commented 1 month ago

Issue description

When I try to install the package kdelikelihood from PyPi in my magic environment, I receive the following error:

  × failed to solve the pypi requirements of 'default' 'linux-64'
  ├─▶ Failed to build: `kdelikelihood==0.2.1`
  ├─▶ Failed to install requirements from build-system.requires (install)
  ├─▶ Failed to prepare distributions
  ├─▶ Failed to fetch wheel: numpy==1.26.4
  ├─▶ Failed to extract archive
  ╰─▶ Unsupported archive type: numpy

This happens regardless of whether I install numpy before (via pypi or not). When I work directly via pip in a conda environment, everything works fine:

pip install kdelikelihood

Potential relevant options in the setup.cfg of the package:

[options]
setup_requires =
    numpy >= 1.23
    cython >= 3
install_requires =
    numpy >= 1.23
    scipy
    matplotlib
    py-bobyqa
    objectproxypool

Steps to reproduce

Set up a new environment

magic init myenv --format mojoproject

Enter the directory

cd myenv

Try to install the package

magic add --pypi kdelikelihood

Version Info

- magic 0.2.3
- WSL on Windows 10
DWSimmons commented 4 weeks ago

I noticed for your version info, you put the modular cli 0.9.2. What version of the magic CLI are you using?

I'm on linux and I was able to add kdeliklihood

darin@home:/media/darin/M2/magic$ magic init six --mojoproject
✔ Created /media/darin/M2/magic/six/mojoproject.toml
✔ Added max >=24.5.0,<25
darin@home:/media/darin/M2/magic$ cd six
darin@home:/media/darin/M2/magic/six$ magic s
 . "/tmp/pixi_env_K9i.sh"
darin@home:/media/darin/M2/magic/six$  . "/tmp/pixi_env_K9i.sh"
(six) darin@home:/media/darin/M2/magic/six$ magic add numpy
✔ Added numpy >=1.26.4,<2
(six) darin@home:/media/darin/M2/magic/six$ magic add --pypi kdelikelihood
✔ Added kdelikelihood >=0.2.1, <0.3
Added these as pypi-dependencies.
samufi commented 4 weeks ago

I am using magic CLI version 0.2.3 - sorry for referring to the wrong tool. I have uninstalled modular.

For me the issue still persists.