Regarding venv, I understand it comes with python, but I've seen many manually install pyenv separately.. why, what's the difference between 1) pipx 2) venv / virtualenv 3) pyenv (not pyvenv ) with or without the virtualenv plugin (i.e. pyenv-virtualenv) Also, is pipreqs smart enough to analyze my python script and determine that some imports are not actually used, and therefore won't add it to the requirements txt? I'd like to find a way to give it a script and have it report the versions the user will need.. ONLY for the packages that are used somewhere in the code!
@samosertogo Жыл бұрын
Thanks a lot, I'been struggling a lot trying to use pipreqs directly from a cmd promp but showing no results (I think it's because I'm working directly on a Sharepoint folder). This solution worked perfectly, thank you man!
@joryaock2 жыл бұрын
Followed the tutorial. Typed in pipreqs to the cmd prompt and get a command not found response. Any suggestions?
@DevOpsJourney2 жыл бұрын
Pip install pipreqs should fix this for you
@Pabz2030 Жыл бұрын
Use this command in powershell from the directory containing your python code: python -m pipreqs
@thiagolcmelo3 жыл бұрын
Maybe it is a wrapper around pip freeze, that is where it pulls the versions from, just thinking, not sure
@rabbitinnh2 жыл бұрын
I tested - it uses the latest versions.
@haryakumuda67982 жыл бұрын
it give me blank requirements.txt eventhough on cmd, it detect my packages
@kod86163 жыл бұрын
Thanks, very good work and high quality videos, keep uploading!
@DevOpsJourney3 жыл бұрын
Thanks, will do!
@Amr-Ibrahim-AI Жыл бұрын
Thanks for the simple yet effective video Saved me some good time :)
@chikosan992 жыл бұрын
What is the difference with pip3 freeze > requirements.txt ?
@DevOpsJourney2 жыл бұрын
Pip freeze is a good solution but it will include all the packages installed on your system - and not just the ones required for your project. Being good about using virtual environments can mitigate this but not everyone is on top of maintaining venvs
@davidolona73652 жыл бұрын
it just created an empty requirements.txt any fix?
@DevOpsJourney2 жыл бұрын
It sounds like maybe your python file might not be using any modules that aren't already built into python?
@davidolona73652 жыл бұрын
@@DevOpsJourney I see the reason is because I want to deploy it on heroku and it’s not working idk what to do.
@silentt21433 жыл бұрын
Thanks for the video. I was wondering if you could help me figure out how to automatically name new files with python? I have created a very basic tkinter app that allows users to enter a url into an input, and then once they press upload, that url will be saved as a PDF. The problem is the PDF always has the same name since it is manually placed within the script. How can I get python to change the name after every new submission (e.g. pdf1.pdf, pdf2.pdf, pdf3.pdf, etc)?
@yogeshparab78522 жыл бұрын
option 1: use a random string generator option 2: define a global variable and +1 on every run and use it while saving the file
@mabrouk6423 жыл бұрын
Thank you for another informative post
@54M1WUL3 жыл бұрын
can u write code what devops write plz
@DevOpsJourney3 жыл бұрын
Hi Samiwul. Devops write a lot of scripts, but they are not very specific. The scripts that my company wants will be very different from what yours wants. That's why I make these smaller videos showing off these modules. Every Python module video I make is based on something I had to do on the Job as a DevOps Engineer. You might enjoy my playlist: kzbin.info/aero/PLnFWJCugpwfztr1ND_n0b_j-QXV20DHNj In the future, I hope to have a course for Learning Python as a DevOps Engineer. I hope you stick around so you can see it. Thank you for your comment.
@Shubhamhirau3 жыл бұрын
Hey Man , where are you ??
@DevOpsJourney3 жыл бұрын
Just been busy with a few things! I've got a few videos planned, hope to be pushing out more content over the next few months! Thank you for checking up on me :)
@digitalzoul572 жыл бұрын
Thanks, it was very usefull !!
@niflag2 жыл бұрын
Doesn't work; the term 'pipreqs' is not recognized
@DevOpsJourney2 жыл бұрын
pip install pipreqs
@Pabz2030 Жыл бұрын
Use this command in powershell from the directory containing your python code: python -m pipreqs