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

Most upvoted comments

@tblazina

poetry add dask -E complete

Will add dask with extras of “complete”, and this will appear in your pyproject.toml file:

dask = {version = "^1.1",extras = ["complete"]}

@zh0uquan You have to put quotes around delegator.py:

[tool.poetry.dependencies]
python = "^3.5"
"delegator.py" = { git = "https://github.com/kennethreitz/delegator.py.git", branch = "master"}

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 use poetry 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 the dask repo when using poetry add but it only picks up the core library. I can get around it by using poetry 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:

$ poetry --version
Poetry 0.10.0-alpha.0

$ poetry add drf-yasg==1.4.0
...
- Installing ruamel-yaml (0.15.37)

[VenvCommandError]
Command ['pip', 'install', '--no-deps', '-r', '/var/folders/h1/2b6gts3x37zcnj5khyv8y5180000gn/T/ruamel-yaml-0.15.37powk8ptereqs.txt'] errored with the following output:
Collecting ruamel-yaml==0.15.37 (from -r /var/folders/h1/2b6gts3x37zcnj5khyv8y5180000gn/T/ruamel-yaml-0.15.37powk8ptereqs.txt (line 1))
  Could not find a version that satisfies the requirement ruamel-yaml==0.15.37 (from -r /var/folders/h1/2b6gts3x37zcnj5khyv8y5180000gn/T/ruamel-yaml-0.15.37powk8ptereqs.txt (lin
e 1)) (from versions: )
No matching distribution found for ruamel-yaml==0.15.37 (from -r /var/folders/h1/2b6gts3x37zcnj5khyv8y5180000gn/T/ruamel-yaml-0.15.37powk8ptereqs.txt (line 1))
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

where the correct name is ruamel.yaml.