poetry: Can't install packages that have dots in their names
The package is found but can not be installed. The dot is replaced with a dash and then the package with the dashed name can’t be found. For example:
$ poetry add wheezy.web
Using version ^0.1.485 for wheezy.web
Updating dependencies
Resolving dependencies.........
Package operations: 1 install, 0 updates, 0 removals
Writing lock file
- Installing wheezy-web (0.1.485)
[VenvCommandError]
Command ['pip', 'install', '--no-deps', '-r', '/tmp/wheezy-web-0.1.485l7n3up
cmreqs.txt'] errored with the following output:
Collecting wheezy-web==0.1.485 (from -r /tmp/wheezy-web-0.1.485l7n3upcmreqs.
txt (line 1))
Could not find a version that satisfies the requirement wheezy-web==0.1.48
5 (from -r /tmp/wheezy-web-0.1.485l7n3upcmreqs.txt (line 1)) (from versions:
)
No matching distribution found for wheezy-web==0.1.485 (from -r /tmp/wheezy-
web-0.1.485l7n3upcmreqs.txt (line 1))
The same thing happens with zope.interface
so I’m guessing this goes for all packages that have dots in their names.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 3
- Comments: 19 (11 by maintainers)
Commits related to this issue
- Fix references to ruamel.yaml using dot . instead of hyphen - for package name See https://github.com/python-poetry/poetry/issues/109#issuecomment-451153486 — committed to commonknowledge/groundwork by janbaykara 2 years ago
- Mapbox peer dependency (#113) * Add pre-commit safety check * Update packages for security reasons * Code linting/formatting adheres to gitignore * Trigger rebuild * Upgrade safety * T... — committed to commonknowledge/groundwork by janbaykara 2 years ago
@tblazina
poetry add dask -E complete
Will add
dask
with extras of “complete”, and this will appear in your pyproject.toml file:@zh0uquan You have to put quotes around
delegator.py
:This issue is only tangentially related to what you are experiencing, @janbaykara. Nothing here relates to the lock file format and name handling. If you are experiencing a package that will not install/lock correctly, please reproduce it in a clean container or VM and provide a step by step reproduction (with project files) and complete verbose mode (
-vvv
) command output as a bug report.Poetry is now writing the canonical name of a package to pyproject.toml instead of a pretty name. Unlike before, where this caused bugs, Poetry reads the name as a canonicalized name as well. This is not a bug, and the information in this issue is well out of date. This is one of many reasons that requesting support/clarification in an old issue can be fraught – I would encouraging opening a new issue if you think you have encountered a bug in the future, as you’ll get more engagement/visibility there as well.
I’m facing a similar issue trying to insalll
dask
(http://docs.dask.org/en/latest/install.html), the problem being that if you usepoetry add dask
it installs the core library but they have sub dependency sets that they recommend installing using, for example,pip install "dask[complete]"
. I’ve tried specifying thedask
repo when usingpoetry add
but it only picks up the core library. I can get around it by usingpoetry run pip install "dask[complete]"
but am then unsure how to specify the dependencies in the.toml
file. Any way around this currently?@jacebrowning I just tested on
0.9.1
and it works fine on my end.This also affects a dependency’s dependencies:
where the correct name is
ruamel.yaml
.