removing bpython removed requests, which poetry needs
See original GitHub issue> <new venv>
> pip install poetry
> poetry new <project>
> cd <project>
> poetry add --dev bpython
Using version ^0.17.1 for bpython
Updating dependencies
Resolving dependencies............
Package operations: 8 installs, 0 updates, 0 removals
Writing lock file
- Installing cryptography (2.2.2)
- Installing curtsies (0.3.0)
- Installing greenlet (0.4.13)
- Installing ndg-httpsclient (0.4.4)
- Installing pyasn1 (0.4.2)
- Installing pygments (2.2.0)
- Installing pyopenssl (17.5.0)
- Installing bpython (0.17.1)
> poetry remove --dev bpython
Updating dependencies
Resolving dependencies....
Package operations: 0 installs, 0 updates, 13 removals
Writing lock file
- Removing bpython (0.17.1)
- Removing certifi (2018.1.18)
- Removing chardet (3.0.4)
- Removing cryptography (2.2.2)
- Removing curtsies (0.3.0)
- Removing greenlet (0.4.13)
- Removing idna (2.6)
- Removing ndg-httpsclient (0.4.4)
- Removing pyasn1 (0.4.2)
- Removing pygments (2.2.0)
- Removing pyopenssl (17.5.0)
- Removing requests (2.18.4)
- Removing urllib3 (1.22)
> poetry add bpython
[ModuleNotFoundError]
No module named 'requests'
add [-D|--dev] [--optional] [--dry-run] [--] <name> (<name>)...
>
You can see that poetry removes more than it installed for bpython. In particular, it removed requests
, which it needs to operate.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Poetry remove fails to remove any packages? - Stack Overflow
python3 v3.9, on a virtual env with a brew installed python. But, the error repeats itself on the python:3.9-buster image.
Read more >Commands | Documentation | Poetry - Python dependency ...
The remove command removes a package from the current list of installed packages. poetry remove pendulum. If you want to remove a package...
Read more >Using Python's pip to Manage Your Projects' Dependencies
Fix common errors related to working with pip; Install and uninstall packages with pip; Manage projects' dependencies using requirements files.
Read more >PEP 440 - Request additional example(s) be added to remove ...
Introduction I went down a rabbit hole today with poetry Issue 7047 (hyperlink removed due to 2 link limit for new users) That...
Read more >Python packaging and dependency management using poetry
If you decide Poetry isn't your thing, you can completely remove it from your system by running the installer again with the --uninstall...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh. I see what the problem is!
You should not install poetry in your virtualenv but globally.
poetry
is not intended to be installed inside the virtualenv you want to work on.My suggestion would be for poetry to detect that it’s installed in the same env it’s managing and take its own dependencies into consideration when managing that environment. Poetry could conceivably do this by detecting that it’s locally installed, and if it doesn’t have a record of its deps, reinstall itself to gain that record, then clean up anything left over.
It doesn’t have to be done that way. It doesn’t have to be done at all. If it’s not done at all, I’d at least like to see some text in the resulting error that guesses that maybe this unsupported installation method is to blame.
Generally, my contention is that it should be more difficult to use poetry to break poetry’s own dependencies, particularly when it’s billed as a smarter dependency management solution. I’ll understand/respect if @sdispater wants to close this, or if it just gets low priority, but I still think local installation is a reasonable case to handle.