Hi ππ
In this post i will share with you how to Generate the requirements.txt file automatically.
I will use a tool called Pipreqs it is very easy to use.
step 1
install pipreqs pip install pipreqs
step 2
Open your code editor and write any script to test. I will write this for the test.
import moviepy.editor as mp
import colored
from PIL import Image
from pyfiglet import figlet_format
print(colored.stylize(figlet_format('Testscript. ;)'), colored.fg(50)))
def test(image_path):
img = Image.open(image_path)
If you are using Vscode, you can write pipreqs
in the terminal.
If you havent terminal in your code editor
open the cmd and write pipreqs /home/project/location
For more information
https://stackoverflow.com/questions/57907655/how-to-use-pipreqs-to-create-requirements-txt-file
result
requirements.txt file
colored==2.2.3
moviepy==1.0.3
Pillow==9.5.0
Pillow==10.0.0
pyfiglet==0.8.post1
Now we're done π€
Don't forget to like and follow π
Support me on PayPal π€
https://www.paypal.com/paypalme/amr396