Whenever I use pip-compile, it creates a dummy file with name like .__atomic-writeg1jehpnz....
I expect requirements.txt with proper package list to be generated.
It always creates a dummy file with the proper result.
I tried without requirements.txt according to the README.
But it always creates an empty requirements.txt and a dummy file.
I always copy contents from the dummy file to the requirements.txt and remove the dummy file.
It's annoying and not sure why this happens.
Am I missing something?
Hello @FreelanceDev217,
Thanks for the issue! Unfortunately, I couldn't reproduce it locally. Could you please provide additional details?
requirements.in do you use?--verbose flag?Which requirements.in do you use?
sqlalchemy
Which command do you run to compile requirments?
`pip-compile requirements.in > requirements.txt
Could you attach an output from compile command with --verbose flag?
(DFS_DB~1) F:\167 NBA_Fantasy\Python\DFS_DB_Manage>pip-compile requirements.in > requirements.txt --verbose
Using indexes:
https://pypi.org/simple
ROUND 1
Current constraints:
decouple (from -r requirements.in (line 2))
sqlalchemy (from -r requirements.in (line 1))
Finding the best candidates:
found candidate decouple==0.0.7 (constraint was <any>)
found candidate sqlalchemy==1.3.13 (constraint was <any>)
Finding secondary dependencies:
sqlalchemy==1.3.13 requires -
decouple==0.0.7 requires -
------------------------------------------------------------
Result of round 1: stable, done
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile requirements.in
#
decouple==0.0.7
sqlalchemy==1.3.13
After running, .__atomic-writeqepebgwb is genereated with the output of pip-compile.
And a new blank requirements.txt is generated too.
Could you try this command instead?
$ pip-compile requirements.in --output-file requirements.txt
That does the trick. Maybe > is not well recognized in Windows?
pip-compile prints the output to stderr (not stdout), that's why > requirements.txt makes the requirements file empty.
Thank you very much for your kind help.
I must note that pip-tools doesn't work well with stream redirecting. Be careful with that. Better to use --output-file option. Glad to help!
Most helpful comment
I must note that
pip-toolsdoesn't work well with stream redirecting. Be careful with that. Better to use--output-fileoption. Glad to help!