New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some dependencies are renamed if conda-lock is used with a pyproject.toml file. #508
Comments
I dug around in the source and found that this is where the mapping comes from: https://raw.githubusercontent.com/regro/cf-graph-countyfair/master/mappings/pypi/grayskull_pypi_mapping.yaml
Conda package names can't be guaranteed to match pypi package names, so a mapping is needed. I don't know much more detail about this, but it looks like the entry for EDIT: Digging a bit deeper... Here's the README for that data file: https://github.com/regro/cf-graph-countyfair/blob/master/mappings/pypi/README.md The static mapping file linked from there contains the following (I think, correct, following the pattern for - pypi_name: seaborn
import_name: seaborn
conda_name: seaborn-base I would expect this static mapping to be the primary source of truth, but perhaps it's being overwritten by |
Looks like this has been reported before, resolved, and then regressed. regro/cf-scripts#1513 |
Thanks so much @mfisher87 for jumping in on this! You're spot-on. I wonder why this regressed. |
For a little more context, the mapping uses some graph-theoretic algorithms in order to make an intelligent guess of what the best package is. It's actually really confusing, because the "mapping" is actually a 3-way relation between PyPI name, conda-forge name, and import name. The mapping is regenerated every hour or so. From the logs we see that there are two candidates for Seaborn. Not sure why the mapping isn't picking this up:
After cloning locally and blaming, I can see that the mapping for Seaborn has been broken a long time (as far back as the Git history goes). My guess is that adding the static mapping entry never fixed the problem. |
Checklist
What happened?
Using conda-lock v2.2.1, I encountered the following strange behaviour:
I am using a pyproject.toml file, where my dependencies are defined like this:
[project]
dependencies = [
"yaml",
"numpy",
"pandas",
"python-dateutil",
"pytables",
"xarray",
"matplotlib",
"tensorflow",
"seaborn",
]
[tool.conda-lock]
channels = [
'conda-forge',
]
platforms = [
'linux-64'
]
I never encountered any problems, but now, with the seaborn package, I found that conda-lock renames seaborn to seaborn-split and complains that it can't find that package.
Using a dev.yml file everything works fine.
Conda Info
No response
Conda Config
No response
Conda list
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: