Cannot add "Pillow" package dependency through interactive init
See original GitHub issue-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option). -
OS version and name: Windows 10 x64 2004
-
Poetry version: 1.1.4
-
Link of a Gist with the contents of your pyproject.toml file: not relevant
Issue
Hi, I tried to interactively create a new project with some existing python files using poetry init
. However I found some sad behaviour when trying to interactively specify packages I wanted.
I couldn’t add the Pillow
package. Adding matplotlib worked fine. I think you can see the issue from the terminal output…
Search for package to add (or leave blank to continue): matplotlib
Found 20 packages matching matplotlib
Enter package # to add, or the complete package name if it is not listed:
[0] matplotlib
[1] jirafs-matplotlib
[2] matplotlib-helper
[3] matplotlib-venn
[4] chineseize-matplotlib
[5] matplotlib-colorbar
[6] django-matplotlib
[7] matplotlib-pgfutils
[8] matplotlib-stream
[9] matplotlib-helpers
> 0
Enter the version constraint to require (or leave blank to use the latest version):
Using version ^3.3.4 for matplotlib
Add a package: Pillow
Found 20 packages matching Pillow
Enter package # to add, or the complete package name if it is not listed:
[0] Pillow3f
[1] pillow-lut
[2] pillow-affine
[3] pillow-scripts
[4] pillow-snippet
[5] pillow-tools
[6] Pillow-PIL
[7] pillow-stackblur
[8] Pillow-SIMD
[9] images2gif-Pillow
> pillow
Value "pillow" is invalid
Enter package # to add, or the complete package name if it is not listed:
[0] Pillow3f
[1] pillow-lut
[2] pillow-affine
[3] pillow-scripts
[4] pillow-snippet
[5] pillow-tools
[6] Pillow-PIL
[7] pillow-stackblur
[8] Pillow-SIMD
[9] images2gif-Pillow
> Pillow
Value "Pillow" is invalid
Enter package # to add, or the complete package name if it is not listed:
[0] Pillow3f
[1] pillow-lut
[2] pillow-affine
[3] pillow-scripts
[4] pillow-snippet
[5] pillow-tools
[6] Pillow-PIL
[7] pillow-stackblur
[8] Pillow-SIMD
[9] images2gif-Pillow
>
(env) C:\Users\Matthew\code\orbits>
So confusingly, the normal Pillow
package was nowhere to be found, and apparently writing the complete package name “Pillow” as instructed is invalid?
I would also like to add that there is no instructions on how to (manually?) finish adding package dependencies. I pressed control+C at the end hoping to continue to the next step, but it killed the whole process.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:13 (2 by maintainers)
I’m also having this issue, and was unsuccessful finding a similar ticket.
Edit: FWIW
poetry add Pillow
worked just fine 👍Duplicate of https://github.com/python-poetry/poetry/issues/3434, which has been closed since the issue appears to have been fixed in 1.2.0b1.
For the other issue mentioned (
'NoneType' object has no attribute 'replace'
), I’ve just tested on latest version frommaster
branch, and it does seem to have been fixed, meaning you can now exit dependency adding by typing an empty choice for the selection, then an empty choice for the package name to go the next question: