coiled / feedback

A place to provide Coiled feedback
14 stars 3 forks source link

Issues package-syncing numpy #211

Closed jfb51 closed 1 year ago

jfb51 commented 2 years ago

Hi there,

I'm excited to start using package-sync, so gave it a shot but had an issue which I'm not sure whether is user error or a bug. Error occurs here:

File ~/.conda/envs/test/lib/python3.9/site-packages/coiled/scan.py:219, in scan_prefix(prefix)
    213 # remove conda placeholders
    214 pip_env = {
    215     pkg_name: pkg
    216     for pkg_name, pkg in pip_env.items()
    217     if not isinstance(pkg, CondaPlaceHolder)
    218 }
--> 219 return sorted(
    220     list(pip_env.values()) + list(filterd_conda.values()),
    221     key=lambda pkg: pkg["name"],
    222 )

TypeError: '<' not supported between instances of 'NoneType' and 'str'

And looking at my packages, I'd imagine it fails on the 'numpy_and_numpy_base' one below, which has name=None. However, I don't understand whether that package is somehow part of all numpy installations or not. Has anyone else seen the same thing?

{'name': 'numpy', 'source': 'pip', 'channel': None, 'channel_url': None, 'subdir': None, 'conda_name': None, 'version': '1.23.3', 'wheel_target': None}, {'name': None, 'source': 'pip', 'channel': None, 'channel_url': None, 'subdir': None, 'conda_name': None, 'version': None, 'wheel_target': 'file:///private/var/folders/sy/f16zz6x50xz3113nwtb9bvq00000gp/T/abs_10c245a1-1c81-453c-8b70-3e944787a8d9mo1xhesu/croots/recipe/numpy_and_numpy_base_1653915529188/work'}

ntabris commented 2 years ago

I think numpy_and_numpy_base is a metapackage that includes numpy and numpy-base, and it's something that package sync ought to ignore.

It appears that it's part of the anaconda channel numpy recipe:

https://github.com/AnacondaRecipes/numpy-feedstock/blob/master/recipe/meta.yaml#L4

But not part of the conda-forge recipe:

https://github.com/conda-forge/numpy-feedstock/blob/main/recipe/meta.yaml

@jfb51, mind letting us know what conda list numpy shows for you? If numpy came from anaconda channel, it's possible that installing it from conda-forge would be a work-around for now (i.e., conda uninstall numpy then conda install -c conda-forge numpy).

ntabris commented 2 years ago

fyi @shughes-uk

shughes-uk commented 1 year ago

Long resolved