You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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: macOS Monterey 12.1
Poetry version: latest
Issue
My requirements.txt:
attrs==19.3.0 # via pytest
beautifulsoup4
certifi==2019.9.11 # via requests
chardet==3.0.4 # via requests
django-debug-toolbar==2.2
django==2.2.6
idna==2.8 # via requests
importlib-metadata==1.5.0 # via pluggy, pytest
mixer==7.1.2
more-itertools==8.2.0 # via pytest
packaging==20.1 # via pytest
pluggy==0.13.1 # via pytest
py==1.8.1 # via pytest
pyparsing==2.4.6 # via packaging
pytest-django==3.8.0
pytest-pythonpath==0.7.3
pytest==5.3.5 # via pytest-django
pytz==2019.3 # via django
requests==2.22.0
six==1.14.0 # via packaging
sorl-thumbnail==12.6.3
sqlparse==0.3.0 # via django, django-debug-toolbar
urllib3==1.25.6 # via requests
wcwidth==0.1.8 # via pytest
zipp==2.2.0 # via importlib-metadata
Best solution:
Remove all the comments like (# via pytest) in the requirements.txt
Reason: cat requirements.txt | xargs poetry add
this command will input all the contents of requirements.txt as parameters to poetry (including comments like # via pytest)
😭 I hope poetry will support installation using requirements.txt.
The comments are indeed preventing the command from working, so you would need to strip them out, for instance by running:
cat requirements.txt | sed 's/#.*//'| xargs poetry add
As for the feature of importing packages from requirements.txt, given that this is usually a one-time operation, it is unlikely to be implemented directly on Poetry.
But with the next 1.2 release that makes it possible to build plugins, there may be a way to implement that as a Poetry plugin if people really want that feature.
See #1701 and #663 for previous discussions on the subject.
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: macOS Monterey 12.1
Poetry version: latest
Issue
My requirements.txt:
I'm executing:
cat requirements.txt | xargs poetry add
Trace:
The text was updated successfully, but these errors were encountered: